

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=auto>



<head>
  <meta charset="UTF-8">

  <link rel="apple-touch-icon" sizes="76x76" href="/img/goose.png">
  <link rel="icon" href="/img/goose.png">
  

  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="author" content="Victor">
  <meta name="keywords" content="">
  
    <meta name="description" content="前言 两个月前，我把MacTex（TeX Live的mac发行版）从mac中删除，因为mac的磁盘空间不足。然而，MikTex带来的问题超乎我的想象。原本以为MikTex仅仅是精简了包，空间上大大缩减，谁知在编译中文的时候，MikTex频频出问题。Claude多次提醒我可能是MikTex对于中文的支持不够好。事实证明（至少在我的mac上如此）MikTex只能保证在编译诸如test.tex、test">
<meta property="og:type" content="article">
<meta property="og:title" content="TeX Live+VSCode的本地LaTeX配置">
<meta property="og:url" content="https://zhoucourier.github.io/2024/11/30/%E5%85%B3%E4%BA%8ELaTeX/index.html">
<meta property="og:site_name" content="Victor&#39;s blog">
<meta property="og:description" content="前言 两个月前，我把MacTex（TeX Live的mac发行版）从mac中删除，因为mac的磁盘空间不足。然而，MikTex带来的问题超乎我的想象。原本以为MikTex仅仅是精简了包，空间上大大缩减，谁知在编译中文的时候，MikTex频频出问题。Claude多次提醒我可能是MikTex对于中文的支持不够好。事实证明（至少在我的mac上如此）MikTex只能保证在编译诸如test.tex、test">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://zhoucourier.github.io/2024/11/30/%E5%85%B3%E4%BA%8ELaTeX/workshop.png">
<meta property="og:image" content="https://zhoucourier.github.io/2024/11/30/%E5%85%B3%E4%BA%8ELaTeX/image.png">
<meta property="og:image" content="https://zhoucourier.github.io/2024/11/30/%E5%85%B3%E4%BA%8ELaTeX/image-1.png">
<meta property="og:image" content="https://zhoucourier.github.io/2024/11/30/%E5%85%B3%E4%BA%8ELaTeX/cursor.png">
<meta property="og:image" content="https://zhoucourier.github.io/2024/11/30/%E5%85%B3%E4%BA%8ELaTeX/back.png">
<meta property="article:published_time" content="2024-11-30T12:09:58.000Z">
<meta property="article:modified_time" content="2024-12-04T16:10:44.374Z">
<meta property="article:author" content="Victor">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://zhoucourier.github.io/2024/11/30/%E5%85%B3%E4%BA%8ELaTeX/workshop.png">
  
  
  
  <title>TeX Live+VSCode的本地LaTeX配置 - Victor&#39;s blog</title>

  <link  rel="stylesheet" href="https://lib.baomitu.com/twitter-bootstrap/4.6.1/css/bootstrap.min.css" />



  <link  rel="stylesheet" href="https://lib.baomitu.com/github-markdown-css/4.0.0/github-markdown.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/hint.css/2.7.0/hint.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/KaTeX/0.16.2/katex.min.css" />



<!-- 主题依赖的图标库，不要自行修改 -->
<!-- Do not modify the link that theme dependent icons -->

<link rel="stylesheet" href="//at.alicdn.com/t/c/font_1749284_5i9bdhy70f8.css">



<link rel="stylesheet" href="//at.alicdn.com/t/c/font_1736178_k526ubmyhba.css">


<link  rel="stylesheet" href="/css/main.css" />


  <link id="highlight-css" rel="stylesheet" href="/css/highlight.css" />
  
    <link id="highlight-css-dark" rel="stylesheet" href="/css/highlight-dark.css" />
  




  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    Fluid.ctx = Object.assign({}, Fluid.ctx)
    var CONFIG = {"hostname":"zhoucourier.github.io","root":"/","version":"1.9.8","typing":{"enable":true,"typeSpeed":50,"cursorChar":"_","loop":false,"scope":[]},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"left","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"code_language":{"enable":true,"default":"TEXT"},"copy_btn":true,"image_caption":{"enable":true},"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"placement":"left","headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":true,"loading_img":"/img/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":true,"follow_dnt":true,"baidu":null,"google":{"measurement_id":null},"tencent":{"sid":null,"cid":null},"leancloud":{"app_id":"tug7FNRscgxNLfy5wuyQCOHw-MdYXbMMI","app_key":"3wRjVGCsJDHKYTxHzELIibA7","server_url":null,"path":"window.location.pathname","ignore_local":true},"umami":{"src":null,"website_id":null,"domains":null,"start_time":"2024-01-01T00:00:00.000Z","token":null,"api_server":null}},"search_path":"/local-search.xml","include_content_in_search":true};

    if (CONFIG.web_analytics.follow_dnt) {
      var dntVal = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
      Fluid.ctx.dnt = dntVal && (dntVal.startsWith('1') || dntVal.startsWith('yes') || dntVal.startsWith('on'));
    }
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
  

  

  

  

  

  
    
  



  
<meta name="generator" content="Hexo 7.3.0"></head>


<body>
  

  <header>
    

<div class="header-inner" style="height: 70vh;">
  <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand" href="/">
      <strong>Victor</strong>
    </a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/" target="_self">
                <i class="iconfont icon-home-fill"></i>
                <span>首页</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/" target="_self">
                <i class="iconfont icon-archive-fill"></i>
                <span>归档</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/" target="_self">
                <i class="iconfont icon-category-fill"></i>
                <span>分类</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/" target="_self">
                <i class="iconfont icon-tags-fill"></i>
                <span>标签</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/" target="_self">
                <i class="iconfont icon-user-fill"></i>
                <span>关于</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/links/" target="_self">
                <i class="iconfont icon-link-fill"></i>
                <span>友链</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/languages/" target="_self">
                <i class="iconfont icon-language-fill"></i>
                <span>languages</span>
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalSearch" aria-label="Search">
              <i class="iconfont icon-search"></i>
            </a>
          </li>
          
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" target="_self" href="javascript:;" aria-label="Color Toggle">
              <i class="iconfont icon-dark" id="color-toggle-icon"></i>
            </a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

  

<div id="banner" class="banner" parallax=true
     style="background: url('/img/default.png') no-repeat center center; background-size: cover;">
  <div class="full-bg-img">
    <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
      <div class="banner-text text-center fade-in-up">
        <div class="h2">
          
            <span id="subtitle" data-typed-text="TeX Live+VSCode的本地LaTeX配置"></span>
          
        </div>

        
          
  <div class="mt-3">
    
    
      <span class="post-meta">
        <i class="iconfont icon-date-fill" aria-hidden="true"></i>
        <time datetime="2024-11-30 20:09" pubdate>
          2024年11月30日 晚上
        </time>
      </span>
    
  </div>

  <div class="mt-1">
    
      <span class="post-meta mr-2">
        <i class="iconfont icon-chart"></i>
        
          9.8k 字
        
      </span>
    

    
      <span class="post-meta mr-2">
        <i class="iconfont icon-clock-fill"></i>
        
        
        
          82 分钟
        
      </span>
    

    
    
      
        <span id="leancloud-page-views-container" class="post-meta" style="display: none">
          <i class="iconfont icon-eye" aria-hidden="true"></i>
          <span id="leancloud-page-views"></span> 次
        </span>
        
      
      
    
  </div>


        
      </div>

      
    </div>
  </div>
</div>

</div>

  </header>

  <main>
    
      

<div class="container-fluid nopadding-x">
  <div class="row nomargin-x">
    <div class="side-col d-none d-lg-block col-lg-2">
      
  <aside class="sidebar" style="padding-left: 2rem; margin-right: -1rem">
    <div id="toc">
  <p class="toc-header">
    <i class="iconfont icon-list"></i>
    <span>目录</span>
  </p>
  <div class="toc-body" id="toc-body"></div>
</div>



  </aside>


    </div>

    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div id="board">
          <article class="post-content mx-auto">
            <h1 id="seo-header">TeX Live+VSCode的本地LaTeX配置</h1>
            
              <p id="updated-time" class="note note-info" style="">
                
                  
                    本文最后更新于 2024年12月5日 凌晨
                  
                
              </p>
            
            
              <div class="markdown-body">
                
                <h2 id="前言">前言</h2>
<p>两个月前，我把MacTex（TeX Live的mac发行版）从mac中删除，因为mac的磁盘空间不足。然而，MikTex带来的问题超乎我的想象。原本以为MikTex仅仅是精简了包，空间上大大缩减，谁知在编译中文的时候，MikTex频频出问题。Claude多次提醒我可能是MikTex对于中文的支持不够好。事实证明（至少在我的mac上如此）MikTex只能保证在编译诸如<code>test.tex</code>、<code>test02.tex</code>和<code>test03.tex</code>的时候不会出问题（也可能是因为我太菜了没搞明白）。</p>
<p>毕竟第一次使用MacTex是2024.6，赶着要数模，也没什么空来捣鼓，只能匆匆忙忙，大部分时间都在overleaf上了，便也没精力来看这个本地部署的<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext>LaTeX</mtext></mrow><annotation encoding="application/x-tex">\LaTeX</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8988em;vertical-align:-0.2155em;"></span><span class="mord text"><span class="mord textrm">L</span><span class="mspace" style="margin-right:-0.36em;"></span><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.6833em;"><span style="top:-2.905em;"><span class="pstrut" style="height:2.7em;"></span><span class="mord"><span class="mord textrm mtight sizing reset-size6 size3">A</span></span></span></span></span></span><span class="mspace" style="margin-right:-0.15em;"></span><span class="mord text"><span class="mord textrm">T</span><span class="mspace" style="margin-right:-0.1667em;"></span><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.4678em;"><span style="top:-2.7845em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord textrm">E</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2155em;"><span></span></span></span></span><span class="mspace" style="margin-right:-0.125em;"></span><span class="mord textrm">X</span></span></span></span></span></span>。当时不知何时发现安装了2023和2024两个版本的TeX Live😅，（话说回来，其实在实际中在线的overleaf使用中，2023版本的也曾几次被启用过，来应对2017年的cls模板兼容性问题）自己便索性删掉换成体积更小的MacTex了。</p>
<blockquote>
<p>使用 TexLive 代替 MiKTeX，因为 TeX Live 在 macOS 上的中文支持更好。 ——Claude</p>
</blockquote>
<figure class="highlight latex"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><code class="hljs latex"><span class="hljs-comment">%test.tex</span><br><br><span class="hljs-comment">%纯英文</span><br><span class="hljs-keyword">\documentclass</span>&#123;article&#125;<br><span class="hljs-keyword">\begin</span>&#123;document&#125;<br>Hello World<br><span class="hljs-keyword">\end</span>&#123;document&#125;<br></code></pre></td></tr></table></figure>
<figure class="highlight latex"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><code class="hljs latex"><span class="hljs-comment">%test02.tex</span><br><br><span class="hljs-comment">%使用xeCJK的简单中文xelatex</span><br><span class="hljs-keyword">\documentclass</span>&#123;article&#125;<br><span class="hljs-keyword">\usepackage</span>&#123;xeCJK&#125;<br><span class="hljs-keyword">\setCJKmainfont</span>&#123;Songti SC&#125;<br><span class="hljs-keyword">\begin</span>&#123;document&#125;<br>你好，世界<br>Hello World<br><span class="hljs-keyword">\end</span>&#123;document&#125;<br></code></pre></td></tr></table></figure>
<figure class="highlight latex"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><code class="hljs latex"><span class="hljs-comment">%test03.tex</span><br><br><span class="hljs-comment">%使用ctex的简单中文xelatex</span><br><span class="hljs-keyword">\documentclass</span>&#123;article&#125;<br><span class="hljs-keyword">\usepackage</span>[fontset=none]&#123;ctex&#125;  <span class="hljs-comment">% 禁用默认字体配置</span><br><span class="hljs-keyword">\setCJKmainfont</span>&#123;Songti SC&#125;     <span class="hljs-comment">% 手动设置中文字体</span><br><span class="hljs-keyword">\begin</span>&#123;document&#125;<br>你好，世界<br>Hello World<br><span class="hljs-keyword">\end</span>&#123;document&#125;<br></code></pre></td></tr></table></figure>
<p>然而，一旦遇到如下文档<code>example.tex</code>的<code>preamble</code>的时候，MikTex便会大量报错且重复尝试多次编译且耗时。</p>
<div class='spoiler collapsed'>
    <div class='spoiler-title'>
        点击显示代码
    </div>
    <div class='spoiler-content'>
        <figure class="highlight latex"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br></pre></td><td class="code"><pre><code class="hljs latex"><span class="hljs-comment">% example.tex</span><br><br><span class="hljs-comment">% !Mode:: &quot;TeX:UTF-8&quot;</span><br><span class="hljs-meta">% !TEX program  = xelatex</span><br><br><span class="hljs-comment">%\documentclass&#123;cumcmthesis&#125;</span><br><span class="hljs-keyword">\documentclass</span>[withoutpreface, bwprint]&#123;cumcmthesis&#125; <span class="hljs-comment">%去掉封面与编号页</span><br><span class="hljs-keyword">\usepackage</span>[framemethod=TikZ]&#123;mdframed&#125;<br><span class="hljs-keyword">\usepackage</span>&#123;subcaption&#125; <span class="hljs-comment">% 子标题</span><br><span class="hljs-keyword">\usepackage</span>&#123;algorithm&#125;<br><span class="hljs-keyword">\usepackage</span>&#123;algorithmic&#125;<br><span class="hljs-keyword">\usepackage</span>&#123;float&#125;<br><span class="hljs-keyword">\usepackage</span>&#123;url&#125;<br><span class="hljs-keyword">\usepackage</span>&#123;listings&#125;<br><span class="hljs-keyword">\usepackage</span>&#123;xcolor&#125;<br><span class="hljs-keyword">\usepackage</span>&#123;listings&#125;<br><span class="hljs-keyword">\usepackage</span>[UTF8, CJKmath=true, AutoFakeBold = true]&#123;xeCJK&#125;<br><span class="hljs-keyword">\setCJKmainfont</span>&#123;Songti SC&#125;  <span class="hljs-comment">% 设置中文字体，可以根据系统替换其他中文字体</span><br><span class="hljs-keyword">\lstset</span>&#123;<br>    columns=fixed,<br>    numbers=left,                                         <span class="hljs-comment">% 在左侧显示行号</span><br>    frame=none,                                           <span class="hljs-comment">% 不显示背景边框</span><br>    backgroundcolor=<span class="hljs-keyword">\color</span>[RGB]&#123;245, 245, 244&#125;,             <span class="hljs-comment">% 设定背景颜色</span><br>    keywordstyle=<span class="hljs-keyword">\color</span>[RGB]&#123;40, 40, 255&#125;,                  <span class="hljs-comment">% 设定关键字颜色</span><br>    numberstyle=<span class="hljs-keyword">\footnotesize</span><span class="hljs-keyword">\color</span>&#123;darkgray&#125;,            <span class="hljs-comment">% 设定行号格式</span><br>    commentstyle=<span class="hljs-keyword">\it</span><span class="hljs-keyword">\color</span>[RGB]&#123;0, 96, 96&#125;,                 <span class="hljs-comment">% 设置代码注释的格式</span><br>    stringstyle=<span class="hljs-keyword">\rmfamily</span><span class="hljs-keyword">\slshape</span><span class="hljs-keyword">\color</span>[RGB]&#123;128, 0, 0&#125;,    <span class="hljs-comment">% 设置字符串格式</span><br>    showstringspaces=false,                               <span class="hljs-comment">% 不显示字符串中的空格</span><br>    language=Matlab,                                      <span class="hljs-comment">% 设置语言</span><br>&#125;<br><br><br><span class="hljs-keyword">\title</span>&#123;机场出租车调度与司机决策问题&#125;<br><span class="hljs-keyword">\tihao</span>&#123;C&#125;<br><br><span class="hljs-keyword">\begin</span>&#123;document&#125;<br><span class="hljs-keyword">\maketitle</span><br><span class="hljs-keyword">\begin</span>&#123;abstract&#125;<br></code></pre></td></tr></table></figure>

    </div>
</div>
<p>这个<code>example.tex</code>的<code>preamble</code>是老师给的国赛数模模板，还有个<code>cumcmthesis.cls</code>在同级目录下。</p>
<div class='spoiler collapsed'>
    <div class='spoiler-title'>
        点击显示代码
    </div>
    <div class='spoiler-content'>
        <figure class="highlight latex"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br><span class="line">251</span><br><span class="line">252</span><br><span class="line">253</span><br><span class="line">254</span><br><span class="line">255</span><br><span class="line">256</span><br><span class="line">257</span><br><span class="line">258</span><br><span class="line">259</span><br><span class="line">260</span><br><span class="line">261</span><br><span class="line">262</span><br><span class="line">263</span><br><span class="line">264</span><br><span class="line">265</span><br><span class="line">266</span><br><span class="line">267</span><br><span class="line">268</span><br><span class="line">269</span><br><span class="line">270</span><br><span class="line">271</span><br><span class="line">272</span><br><span class="line">273</span><br><span class="line">274</span><br><span class="line">275</span><br><span class="line">276</span><br><span class="line">277</span><br><span class="line">278</span><br><span class="line">279</span><br><span class="line">280</span><br><span class="line">281</span><br><span class="line">282</span><br><span class="line">283</span><br><span class="line">284</span><br><span class="line">285</span><br><span class="line">286</span><br><span class="line">287</span><br><span class="line">288</span><br><span class="line">289</span><br><span class="line">290</span><br><span class="line">291</span><br><span class="line">292</span><br><span class="line">293</span><br><span class="line">294</span><br><span class="line">295</span><br><span class="line">296</span><br><span class="line">297</span><br><span class="line">298</span><br><span class="line">299</span><br><span class="line">300</span><br><span class="line">301</span><br><span class="line">302</span><br><span class="line">303</span><br><span class="line">304</span><br><span class="line">305</span><br><span class="line">306</span><br><span class="line">307</span><br><span class="line">308</span><br><span class="line">309</span><br><span class="line">310</span><br><span class="line">311</span><br><span class="line">312</span><br><span class="line">313</span><br><span class="line">314</span><br><span class="line">315</span><br><span class="line">316</span><br><span class="line">317</span><br><span class="line">318</span><br><span class="line">319</span><br><span class="line">320</span><br><span class="line">321</span><br><span class="line">322</span><br><span class="line">323</span><br><span class="line">324</span><br><span class="line">325</span><br><span class="line">326</span><br><span class="line">327</span><br><span class="line">328</span><br><span class="line">329</span><br><span class="line">330</span><br><span class="line">331</span><br><span class="line">332</span><br><span class="line">333</span><br><span class="line">334</span><br><span class="line">335</span><br><span class="line">336</span><br><span class="line">337</span><br><span class="line">338</span><br><span class="line">339</span><br><span class="line">340</span><br><span class="line">341</span><br><span class="line">342</span><br><span class="line">343</span><br><span class="line">344</span><br><span class="line">345</span><br><span class="line">346</span><br><span class="line">347</span><br><span class="line">348</span><br><span class="line">349</span><br><span class="line">350</span><br><span class="line">351</span><br><span class="line">352</span><br><span class="line">353</span><br><span class="line">354</span><br><span class="line">355</span><br><span class="line">356</span><br><span class="line">357</span><br><span class="line">358</span><br><span class="line">359</span><br><span class="line">360</span><br><span class="line">361</span><br><span class="line">362</span><br><span class="line">363</span><br><span class="line">364</span><br><span class="line">365</span><br><span class="line">366</span><br><span class="line">367</span><br><span class="line">368</span><br><span class="line">369</span><br><span class="line">370</span><br><span class="line">371</span><br><span class="line">372</span><br><span class="line">373</span><br><span class="line">374</span><br><span class="line">375</span><br><span class="line">376</span><br><span class="line">377</span><br><span class="line">378</span><br><span class="line">379</span><br><span class="line">380</span><br><span class="line">381</span><br><span class="line">382</span><br><span class="line">383</span><br><span class="line">384</span><br><span class="line">385</span><br><span class="line">386</span><br><span class="line">387</span><br><span class="line">388</span><br><span class="line">389</span><br><span class="line">390</span><br><span class="line">391</span><br><span class="line">392</span><br><span class="line">393</span><br><span class="line">394</span><br><span class="line">395</span><br><span class="line">396</span><br><span class="line">397</span><br><span class="line">398</span><br><span class="line">399</span><br><span class="line">400</span><br><span class="line">401</span><br><span class="line">402</span><br><span class="line">403</span><br><span class="line">404</span><br><span class="line">405</span><br><span class="line">406</span><br><span class="line">407</span><br><span class="line">408</span><br><span class="line">409</span><br><span class="line">410</span><br><span class="line">411</span><br><span class="line">412</span><br><span class="line">413</span><br><span class="line">414</span><br><span class="line">415</span><br><span class="line">416</span><br><span class="line">417</span><br><span class="line">418</span><br><span class="line">419</span><br><span class="line">420</span><br><span class="line">421</span><br><span class="line">422</span><br><span class="line">423</span><br><span class="line">424</span><br><span class="line">425</span><br><span class="line">426</span><br><span class="line">427</span><br><span class="line">428</span><br><span class="line">429</span><br><span class="line">430</span><br><span class="line">431</span><br><span class="line">432</span><br><span class="line">433</span><br><span class="line">434</span><br><span class="line">435</span><br><span class="line">436</span><br><span class="line">437</span><br><span class="line">438</span><br><span class="line">439</span><br><span class="line">440</span><br><span class="line">441</span><br><span class="line">442</span><br><span class="line">443</span><br><span class="line">444</span><br><span class="line">445</span><br><span class="line">446</span><br><span class="line">447</span><br><span class="line">448</span><br><span class="line">449</span><br><span class="line">450</span><br><span class="line">451</span><br><span class="line">452</span><br><span class="line">453</span><br><span class="line">454</span><br><span class="line">455</span><br><span class="line">456</span><br><span class="line">457</span><br><span class="line">458</span><br><span class="line">459</span><br><span class="line">460</span><br><span class="line">461</span><br><span class="line">462</span><br><span class="line">463</span><br><span class="line">464</span><br><span class="line">465</span><br><span class="line">466</span><br><span class="line">467</span><br><span class="line">468</span><br><span class="line">469</span><br><span class="line">470</span><br><span class="line">471</span><br><span class="line">472</span><br><span class="line">473</span><br><span class="line">474</span><br><span class="line">475</span><br><span class="line">476</span><br><span class="line">477</span><br><span class="line">478</span><br><span class="line">479</span><br><span class="line">480</span><br><span class="line">481</span><br><span class="line">482</span><br><span class="line">483</span><br><span class="line">484</span><br><span class="line">485</span><br><span class="line">486</span><br><span class="line">487</span><br><span class="line">488</span><br><span class="line">489</span><br><span class="line">490</span><br><span class="line">491</span><br><span class="line">492</span><br><span class="line">493</span><br><span class="line">494</span><br><span class="line">495</span><br><span class="line">496</span><br><span class="line">497</span><br><span class="line">498</span><br><span class="line">499</span><br><span class="line">500</span><br><span class="line">501</span><br><span class="line">502</span><br><span class="line">503</span><br><span class="line">504</span><br><span class="line">505</span><br><span class="line">506</span><br><span class="line">507</span><br><span class="line">508</span><br><span class="line">509</span><br><span class="line">510</span><br><span class="line">511</span><br><span class="line">512</span><br><span class="line">513</span><br><span class="line">514</span><br><span class="line">515</span><br><span class="line">516</span><br><span class="line">517</span><br><span class="line">518</span><br><span class="line">519</span><br><span class="line">520</span><br><span class="line">521</span><br><span class="line">522</span><br><span class="line">523</span><br><span class="line">524</span><br><span class="line">525</span><br><span class="line">526</span><br><span class="line">527</span><br><span class="line">528</span><br><span class="line">529</span><br><span class="line">530</span><br><span class="line">531</span><br><span class="line">532</span><br><span class="line">533</span><br><span class="line">534</span><br><span class="line">535</span><br><span class="line">536</span><br><span class="line">537</span><br><span class="line">538</span><br><span class="line">539</span><br><span class="line">540</span><br><span class="line">541</span><br><span class="line">542</span><br><span class="line">543</span><br><span class="line">544</span><br><span class="line">545</span><br><span class="line">546</span><br><span class="line">547</span><br><span class="line">548</span><br><span class="line">549</span><br><span class="line">550</span><br><span class="line">551</span><br><span class="line">552</span><br><span class="line">553</span><br><span class="line">554</span><br><span class="line">555</span><br><span class="line">556</span><br><span class="line">557</span><br><span class="line">558</span><br><span class="line">559</span><br><span class="line">560</span><br><span class="line">561</span><br><span class="line">562</span><br><span class="line">563</span><br><span class="line">564</span><br><span class="line">565</span><br><span class="line">566</span><br><span class="line">567</span><br><span class="line">568</span><br><span class="line">569</span><br><span class="line">570</span><br><span class="line">571</span><br><span class="line">572</span><br><span class="line">573</span><br><span class="line">574</span><br><span class="line">575</span><br><span class="line">576</span><br><span class="line">577</span><br><span class="line">578</span><br><span class="line">579</span><br><span class="line">580</span><br><span class="line">581</span><br><span class="line">582</span><br><span class="line">583</span><br><span class="line">584</span><br><span class="line">585</span><br><span class="line">586</span><br><span class="line">587</span><br><span class="line">588</span><br><span class="line">589</span><br><span class="line">590</span><br><span class="line">591</span><br><span class="line">592</span><br><span class="line">593</span><br><span class="line">594</span><br><span class="line">595</span><br><span class="line">596</span><br><span class="line">597</span><br><span class="line">598</span><br><span class="line">599</span><br><span class="line">600</span><br><span class="line">601</span><br><span class="line">602</span><br><span class="line">603</span><br><span class="line">604</span><br><span class="line">605</span><br><span class="line">606</span><br><span class="line">607</span><br><span class="line">608</span><br><span class="line">609</span><br><span class="line">610</span><br><span class="line">611</span><br><span class="line">612</span><br><span class="line">613</span><br><span class="line">614</span><br><span class="line">615</span><br><span class="line">616</span><br><span class="line">617</span><br><span class="line">618</span><br><span class="line">619</span><br><span class="line">620</span><br><span class="line">621</span><br><span class="line">622</span><br><span class="line">623</span><br><span class="line">624</span><br><span class="line">625</span><br><span class="line">626</span><br><span class="line">627</span><br><span class="line">628</span><br><span class="line">629</span><br><span class="line">630</span><br><span class="line">631</span><br><span class="line">632</span><br><span class="line">633</span><br><span class="line">634</span><br><span class="line">635</span><br><span class="line">636</span><br><span class="line">637</span><br><span class="line">638</span><br><span class="line">639</span><br><span class="line">640</span><br><span class="line">641</span><br><span class="line">642</span><br><span class="line">643</span><br><span class="line">644</span><br><span class="line">645</span><br><span class="line">646</span><br><span class="line">647</span><br><span class="line">648</span><br><span class="line">649</span><br><span class="line">650</span><br><span class="line">651</span><br><span class="line">652</span><br><span class="line">653</span><br><span class="line">654</span><br><span class="line">655</span><br><span class="line">656</span><br><span class="line">657</span><br><span class="line">658</span><br><span class="line">659</span><br><span class="line">660</span><br><span class="line">661</span><br><span class="line">662</span><br></pre></td><td class="code"><pre><code class="hljs latex"><span class="hljs-comment">%cumcmthesis.cls</span><br><br><span class="hljs-keyword">\NeedsTeXFormat</span>&#123;LaTeX2e&#125;[1995/12/01]<br><span class="hljs-keyword">\ProvidesClass</span>&#123;cumcmthesis&#125;<br>              [2017/09/16 v2.6 Standard LaTeX Template for CUMCM]<br><span class="hljs-comment">%% Inital Code</span><br><span class="hljs-keyword">\newif</span><span class="hljs-keyword">\if@mcm@bwprint</span><span class="hljs-keyword">\@mcm@bwprintfalse</span><br><span class="hljs-keyword">\newif</span><span class="hljs-keyword">\if@mcm@preface</span><span class="hljs-keyword">\@mcm@prefacetrue</span><br><span class="hljs-comment">% tokens definition</span><br><span class="hljs-comment">%%%% 承诺书</span><br><span class="hljs-keyword">\newcommand</span><span class="hljs-keyword">\mcm@tokens@keywords</span>&#123;&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@tokens@tihao</span>&#123;&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@tokens@baominghao</span>&#123;&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@tokens@schoolname</span>&#123;&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@tokens@membera</span>&#123;&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@tokens@memberb</span>&#123;&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@tokens@memberc</span>&#123;&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@tokens@supervisor</span>&#123;&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@tokens@yearinput</span>&#123;&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@tokens@monthinput</span>&#123;&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@tokens@dayinput</span>&#123;&#125;<br><span class="hljs-comment">%%%% 编号专用页</span><br><span class="hljs-comment">% 没有</span><br><span class="hljs-comment">%% Declaration of Options</span><br><span class="hljs-keyword">\DeclareOption</span>&#123;colorprint&#125;&#123;<span class="hljs-keyword">\@mcm@bwprintfalse</span>&#125;<br><span class="hljs-keyword">\DeclareOption</span>&#123;bwprint&#125;&#123;<span class="hljs-keyword">\@mcm@bwprinttrue</span>&#125;<br><span class="hljs-keyword">\DeclareOption</span>&#123;withoutpreface&#125;&#123;<span class="hljs-keyword">\@mcm@prefacefalse</span>&#125;<br><span class="hljs-keyword">\DeclareOption</span>*&#123;<span class="hljs-keyword">\PassOptionsToClass</span>&#123;<span class="hljs-keyword">\CurrentOption</span>&#125;&#123;article&#125;&#125;<br><span class="hljs-comment">%% Executing of Options</span><br><span class="hljs-keyword">\ExecuteOptions</span>&#123;colorprint&#125;<br><span class="hljs-keyword">\ProcessOptions</span><span class="hljs-keyword">\relax</span><br><span class="hljs-comment">%% Loading Class</span><br><span class="hljs-keyword">\LoadClass</span>[a4paper,12pt]&#123;article&#125;<br><span class="hljs-comment">%% Loading Package</span><br><span class="hljs-keyword">\RequirePackage</span>&#123;ifxetex&#125;<br><span class="hljs-keyword">\RequireXeTeX</span><br><span class="hljs-keyword">\ifxetex</span><span class="hljs-keyword">\else</span><br><span class="hljs-keyword">\ClassError</span>&#123;mcmthesis&#125;&#123;You must use the `xelatex&#x27; driver<span class="hljs-keyword">\MessageBreak</span> Please choose `xelatex&#x27;&#125;&#123;<span class="hljs-comment">%</span><br>Just choose `xelatex&#x27;, no `pdflatex&#x27; or `latex&#x27; and so on.&#125;<br><span class="hljs-keyword">\fi</span><br><span class="hljs-comment">% 支持中文的 ctex 宏包</span><br><span class="hljs-keyword">\RequirePackage</span>&#123;ctex&#125;<br><span class="hljs-comment">% 页面布局</span><br><span class="hljs-keyword">\RequirePackage</span>&#123;geometry&#125;<br><span class="hljs-comment">% 数学宏包</span><br><span class="hljs-keyword">\RequirePackage</span>&#123;amsmath&#125;<br><span class="hljs-keyword">\RequirePackage</span>&#123;amsfonts&#125;<br><span class="hljs-keyword">\RequirePackage</span>&#123;amssymb&#125;<br><span class="hljs-keyword">\RequirePackage</span>&#123;bm&#125;<br><span class="hljs-comment">%\RequirePackage&#123;titletoc&#125;</span><br><span class="hljs-comment">% 设置颜色</span><br><span class="hljs-keyword">\RequirePackage</span>&#123;xcolor&#125;<br><span class="hljs-comment">% 插入图片</span><br><span class="hljs-keyword">\RequirePackage</span>&#123;graphicx&#125;<br><span class="hljs-keyword">\RequirePackage</span>&#123;float&#125;<br><span class="hljs-comment">% 表格</span><br><span class="hljs-keyword">\RequirePackage</span>&#123;array&#125;<br><span class="hljs-comment">%% 长表格</span><br><span class="hljs-keyword">\RequirePackage</span>&#123;longtable&#125;<br><span class="hljs-comment">%% booktabs 提供了\toprule 等命令.</span><br><span class="hljs-keyword">\RequirePackage</span>&#123;booktabs,tabularx&#125;<br><span class="hljs-comment">%% multirow 支持在表格中跨行</span><br><span class="hljs-keyword">\RequirePackage</span>&#123;multirow&#125;<br><span class="hljs-comment">%% 调整间隔, 让表格更好看些</span><br><span class="hljs-keyword">\RequirePackage</span>&#123;bigstrut&#125;<br><span class="hljs-comment">%% 在跨行表格中输入定界符</span><br><span class="hljs-keyword">\RequirePackage</span>&#123;bigdelim&#125;<br><span class="hljs-comment">% 保护脆落命令</span><br><span class="hljs-keyword">\RequirePackage</span>&#123;cprotect&#125;<br><span class="hljs-comment">% 设置代码环境</span><br><span class="hljs-keyword">\RequirePackage</span>&#123;listings&#125;<br><span class="hljs-keyword">\RequirePackage</span>&#123;xcolor&#125;<br><span class="hljs-comment">% 插入链接</span><br><span class="hljs-keyword">\RequirePackage</span>&#123;url&#125;<br><span class="hljs-comment">% 绘图的包</span><br><span class="hljs-comment">%\RequirePackage&#123;tikz&#125;</span><br><span class="hljs-comment">%\usetikzlibrary&#123;snakes&#125;</span><br><br><span class="hljs-comment">% 字图与子标题</span><br><span class="hljs-keyword">\RequirePackage</span>&#123;subcaption&#125;<br><span class="hljs-keyword">\RequirePackage</span>[titles]&#123;tocloft&#125;<br><span class="hljs-comment">%\renewcommand&#123;\cftdot&#125;&#123;$\cdot$&#125;</span><br><span class="hljs-comment">%\renewcommand&#123;\cftsecdotsep&#125;&#123;1.5&#125;</span><br><span class="hljs-keyword">\renewcommand</span>&#123;<span class="hljs-keyword">\cftsecdotsep</span>&#125;&#123;4.5&#125;<br><span class="hljs-keyword">\setlength</span>&#123;<span class="hljs-keyword">\cftbeforesecskip</span>&#125;&#123;7pt&#125;<br><span class="hljs-keyword">\setlength</span>&#123;<span class="hljs-keyword">\cftbeforesubsecskip</span>&#125;&#123;3pt&#125;<br><span class="hljs-comment">%\setlength&#123;\cftbeforesubsecskip&#125;&#123;5pt&#125;</span><br><span class="hljs-keyword">\renewcommand</span>&#123;<span class="hljs-keyword">\cftsecfont</span>&#125;&#123;<span class="hljs-keyword">\bfseries</span><span class="hljs-keyword">\zihao</span>&#123;-4&#125;<span class="hljs-keyword">\heiti</span>&#125;<br><span class="hljs-keyword">\renewcommand</span>&#123;<span class="hljs-keyword">\cftsecleader</span>&#125;&#123;<span class="hljs-keyword">\cftdotfill</span>&#123;<span class="hljs-keyword">\cftsecdotsep</span>&#125;&#125;<br><span class="hljs-keyword">\renewcommand</span>&#123;<span class="hljs-keyword">\cftsecaftersnumb</span>&#125;&#123;<span class="hljs-keyword">\hskip</span>.4em&#125;<br><br><br><br><span class="hljs-keyword">\definecolor</span>&#123;dkgreen&#125;&#123;rgb&#125;&#123;0,0.6,0&#125;<br><span class="hljs-keyword">\definecolor</span>&#123;gray&#125;&#123;rgb&#125;&#123;0.5,0.5,0.5&#125;<br><span class="hljs-keyword">\definecolor</span>&#123;mauve&#125;&#123;rgb&#125;&#123;0.58,0,0.82&#125;<br><br><span class="hljs-keyword">\lstset</span>&#123;<br>  frame=tb,<br>  aboveskip=3mm,<br>  belowskip=3mm,<br>  showstringspaces=false,<br>  columns=flexible,<br>  framerule=1pt,<br>  rulecolor=<span class="hljs-keyword">\color</span>&#123;gray!35&#125;,<br>  backgroundcolor=<span class="hljs-keyword">\color</span>&#123;gray!5&#125;,<br>  basicstyle=&#123;<span class="hljs-keyword">\small</span><span class="hljs-keyword">\ttfamily</span>&#125;,<br>  numbers=none,<br>  numberstyle=<span class="hljs-keyword">\tiny</span><span class="hljs-keyword">\color</span>&#123;gray&#125;,<br>  keywordstyle=<span class="hljs-keyword">\color</span>&#123;blue&#125;,<br>  commentstyle=<span class="hljs-keyword">\color</span>&#123;dkgreen&#125;,<br>  stringstyle=<span class="hljs-keyword">\color</span>&#123;mauve&#125;,<br>  breaklines=true,<br>  breakatwhitespace=true,<br>  tabsize=3,<br>&#125;<br><span class="hljs-comment">% 首行缩进</span><br><span class="hljs-keyword">\RequirePackage</span>&#123;indentfirst&#125;<br><span class="hljs-comment">% 设置浮动体的标题</span><br><span class="hljs-keyword">\RequirePackage</span>&#123;caption&#125;<br><span class="hljs-comment">% 定制列表环境</span><br><span class="hljs-keyword">\RequirePackage</span>&#123;enumitem&#125;<br><span class="hljs-comment">% 下划线</span><br><span class="hljs-keyword">\RequirePackage</span>&#123;ulem&#125;<br><span class="hljs-comment">% 尺寸计算</span><br><span class="hljs-keyword">\RequirePackage</span>&#123;calc&#125;<br><br><span class="hljs-keyword">\RequirePackage</span>[titletoc,title]&#123;appendix&#125;<br><br><span class="hljs-comment">%\RequirePackage[title,toc,titletoc]&#123;appendix&#125;</span><br><br><span class="hljs-keyword">\RequirePackage</span>&#123;etoolbox&#125;<br><span class="hljs-keyword">\AtBeginEnvironment</span>&#123;thebibliography&#125;&#123;<span class="hljs-comment">%</span><br>    <span class="hljs-keyword">\phantomsection</span><br>    <span class="hljs-keyword">\addcontentsline</span>&#123;toc&#125;&#123;section&#125;&#123;<span class="hljs-keyword">\refname</span>&#125;<br>    &#125;<br><span class="hljs-comment">% 超链接 hyperref 的设置</span><br><span class="hljs-keyword">\RequirePackage</span>&#123;hyperref&#125;<br><span class="hljs-comment">% 智能自动化交叉引用</span><br><span class="hljs-keyword">\RequirePackage</span>&#123;cleveref&#125;<br><span class="hljs-comment">%% Document Layout</span><br><span class="hljs-comment">% 页面布局</span><br><span class="hljs-keyword">\geometry</span>&#123;top=25mm,bottom=35mm,left=25mm,right=25mm, footskip=7mm&#125;<br><span class="hljs-keyword">\renewcommand</span>*&#123;<span class="hljs-keyword">\baselinestretch</span>&#125;&#123;1.38&#125;<br><span class="hljs-comment">% 修改tabular 环境, 设置表格中的行间距为正文行间距.</span><br><span class="hljs-keyword">\let</span><span class="hljs-keyword">\mcm@oldtabular</span><span class="hljs-keyword">\tabular</span><br><span class="hljs-keyword">\let</span><span class="hljs-keyword">\mcm@endoldtabular</span><span class="hljs-keyword">\endtabular</span><br><span class="hljs-keyword">\renewenvironment</span>&#123;tabular&#125;<span class="hljs-comment">%</span><br>	&#123;<span class="hljs-keyword">\bgroup</span><span class="hljs-comment">%</span><br>	<span class="hljs-keyword">\renewcommand</span>&#123;<span class="hljs-keyword">\arraystretch</span>&#125;&#123;1.38&#125;<span class="hljs-comment">%</span><br>	<span class="hljs-keyword">\mcm@oldtabular</span>&#125;<span class="hljs-comment">%</span><br>	&#123;<span class="hljs-keyword">\mcm@endoldtabular</span><span class="hljs-keyword">\egroup</span>&#125;<br><span class="hljs-comment">% 每行缩进两个汉字</span><br><span class="hljs-keyword">\setlength</span><span class="hljs-keyword">\parindent</span>&#123;2em&#125;<br><span class="hljs-comment">% 设置字体</span><br><span class="hljs-keyword">\setmainfont</span>&#123;Times New Roman&#125;<br><span class="hljs-comment">%\setmonofont&#123;Courier New&#125;</span><br><span class="hljs-keyword">\setsansfont</span>&#123;Arial&#125;<br><span class="hljs-keyword">\setCJKfamilyfont</span>&#123;kai&#125;[AutoFakeBold]&#123;Heiti TC&#125;<br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\kai</span>&#125;&#123;<span class="hljs-keyword">\CJKfamily</span>&#123;kai&#125;&#125;<br><span class="hljs-keyword">\setCJKfamilyfont</span>&#123;song&#125;[AutoFakeBold]&#123;Songti SC&#125;<br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\song</span>&#125;&#123;<span class="hljs-keyword">\CJKfamily</span>&#123;song&#125;&#125;<br><br><span class="hljs-keyword">\renewcommand</span><span class="hljs-keyword">\normalsize</span>&#123;<span class="hljs-comment">%</span><br>	<span class="hljs-keyword">\@setfontsize</span><span class="hljs-keyword">\normalsize</span>&#123;12.05&#125;&#123;14.45&#125;<span class="hljs-comment">%</span><br>	<span class="hljs-keyword">\abovedisplayskip</span> 12<span class="hljs-keyword">\p@</span> <span class="hljs-keyword">\@plus</span>3<span class="hljs-keyword">\p@</span> <span class="hljs-keyword">\@minus</span>7<span class="hljs-keyword">\p@</span><br>	<span class="hljs-keyword">\abovedisplayshortskip</span> <span class="hljs-keyword">\z@</span> <span class="hljs-keyword">\@plus</span>3<span class="hljs-keyword">\p@</span><br>	<span class="hljs-keyword">\belowdisplayshortskip</span> 6.5<span class="hljs-keyword">\p@</span> <span class="hljs-keyword">\@plus</span>3.5<span class="hljs-keyword">\p@</span> <span class="hljs-keyword">\@minus</span>3<span class="hljs-keyword">\p@</span>&#125;<br><span class="hljs-comment">% 数学环境, 定理等设置</span><br><span class="hljs-keyword">\newtheorem</span>&#123;definition&#125;&#123;<span class="hljs-keyword">\mcm@cap@definition</span>&#125;<br><span class="hljs-keyword">\newtheorem</span>&#123;theorem&#125;&#123;<span class="hljs-keyword">\mcm@cap@theorem</span>&#125;<br><span class="hljs-keyword">\newtheorem</span>&#123;lemma&#125;&#123;<span class="hljs-keyword">\mcm@cap@lemma</span>&#125;<br><span class="hljs-keyword">\newtheorem</span>&#123;corollary&#125;&#123;<span class="hljs-keyword">\mcm@cap@corollary</span>&#125;<br><span class="hljs-keyword">\newtheorem</span>&#123;assumption&#125;&#123;<span class="hljs-keyword">\mcm@cap@assumption</span>&#125;<br><span class="hljs-keyword">\newtheorem</span>&#123;conjecture&#125;&#123;<span class="hljs-keyword">\mcm@cap@conjecture</span>&#125;<br><span class="hljs-keyword">\newtheorem</span>&#123;axiom&#125;&#123;<span class="hljs-keyword">\mcm@cap@axiom</span>&#125;<br><span class="hljs-keyword">\newtheorem</span>&#123;principle&#125;&#123;<span class="hljs-keyword">\mcm@cap@principle</span>&#125;<br><span class="hljs-keyword">\newtheorem</span>&#123;problem&#125;&#123;<span class="hljs-keyword">\mcm@cap@problem</span>&#125;<br><span class="hljs-keyword">\newtheorem</span>&#123;example&#125;&#123;<span class="hljs-keyword">\mcm@cap@example</span>&#125;<br><span class="hljs-keyword">\newtheorem</span>&#123;proof&#125;&#123;<span class="hljs-keyword">\mcm@cap@proof</span>&#125;<br><span class="hljs-keyword">\newtheorem</span>&#123;solution&#125;&#123;<span class="hljs-keyword">\mcm@cap@solution</span>&#125;<br><br><span class="hljs-comment">% 浮动环境设置</span><br><span class="hljs-comment">% 默认情况下, \LaTeX&#123;&#125; 要求每页的文字至少占据 20%,否则该页就只单独放置一个浮动环境,</span><br><span class="hljs-comment">% 而这通常不是我们想要的, 我们将这个要求降低到 5%.</span><br> <span class="hljs-keyword">\renewcommand</span>*&#123;<span class="hljs-keyword">\textfraction</span>&#125;&#123;0.05&#125;<br><span class="hljs-comment">% 有时如果多个浮动环境连续放在一起, \LaTeX&#123;&#125;</span><br><span class="hljs-comment">% 会将它们分在几个不同页，即使它们可在同一页放</span><br><span class="hljs-comment">% 得下. 我们可以通过修改 |\topfraction| 和 |\bottomfraction| 分别设置顶端和底端的浮</span><br><span class="hljs-comment">% 动环境的最大比例.</span><br> <span class="hljs-keyword">\renewcommand</span>*&#123;<span class="hljs-keyword">\topfraction</span>&#125;&#123;0.9&#125;<br> <span class="hljs-keyword">\renewcommand</span>*&#123;<span class="hljs-keyword">\bottomfraction</span>&#125;&#123;0.8&#125;<br><span class="hljs-comment">% 有时\LaTeX&#123;&#125;会把一个浮动环境单独放在一页,</span><br><span class="hljs-comment">% 我们要求这个环境至少要占据 85% 才能单独放在一页.</span><br><span class="hljs-comment">% 注意:  |\floatpagefraction| 的数值必须小于 |\topfraction|.</span><br> <span class="hljs-keyword">\renewcommand</span>*&#123;<span class="hljs-keyword">\floatpagefraction</span>&#125;&#123;0.85&#125;<br><span class="hljs-comment">% 关于图片 graphicx</span><br> <span class="hljs-comment">% 如果图片没有指定后缀, 依次按下列顺序搜索</span><br><span class="hljs-keyword">\DeclareGraphicsExtensions</span>&#123;.pdf,.eps,.jpg,.png&#125;<br> <span class="hljs-comment">% 设置图表搜索路径, 可以给图表文件夹取如下名字</span><br><span class="hljs-keyword">\graphicspath</span>&#123;&#123;figures/&#125;&#123;figure/&#125;&#123;pictures/&#125;<span class="hljs-comment">%</span><br>  &#123;picture/&#125;&#123;pic/&#125;&#123;pics/&#125;&#123;image/&#125;&#123;images/&#125;&#125;<br><span class="hljs-comment">% 图表标题</span><br><span class="hljs-keyword">\DeclareCaptionFont</span>&#123;song&#125;&#123;<span class="hljs-keyword">\songti</span>&#125;<br><span class="hljs-keyword">\DeclareCaptionFont</span>&#123;minusfour&#125;&#123;<span class="hljs-keyword">\zihao</span>&#123;-4&#125;&#125;<br><span class="hljs-keyword">\captionsetup</span>[figure]&#123;<span class="hljs-comment">%</span><br>	format=hang,   <span class="hljs-comment">% 标题从第二行开始都有缩进, 应该和 justification=raggedright 的效果一样.</span><br>	labelsep=quad, <span class="hljs-comment">% 分隔符是一个空格</span><br>	font=&#123;song,minusfour,bf&#125;, <span class="hljs-comment">% 图的字体, 宋体小四</span><br>	position=bottom <span class="hljs-comment">% position=bottom, 不代表标题放在下面, 标题仍放在你放\caption的位置.</span><br>&#125;<br><span class="hljs-keyword">\captionsetup</span>[table]&#123;<span class="hljs-comment">%</span><br>	format=hang,   <span class="hljs-comment">% 标题从第二行开始都有缩进, 应该和 justification=raggedright 的效果一样.</span><br>	labelsep=quad, <span class="hljs-comment">% 分隔符是一个空格</span><br>	font=&#123;song,minusfour,bf&#125;, <span class="hljs-comment">% 表的字体, 宋体小四</span><br>	position=top <span class="hljs-comment">% position=bottom, 不代表标题放在下面, 标题仍放在你放\caption的位置.</span><br>&#125;<br><span class="hljs-comment">% 列表环境设置</span><br><span class="hljs-keyword">\setlist</span>&#123;<span class="hljs-comment">%</span><br>	topsep=0.3em, <span class="hljs-comment">% 列表顶端的垂直空白</span><br>	partopsep=0pt, <span class="hljs-comment">% 列表环境前面紧接着一个空白行时其顶端的额外垂直空白</span><br>	itemsep=0ex plus 0.1ex, <span class="hljs-comment">% 列表项之间的额外垂直空白</span><br>	parsep=0pt, <span class="hljs-comment">% 列表项内的段落之间的垂直空白</span><br>	leftmargin=1.5em, <span class="hljs-comment">% 环境的左边界和列表之间的水平距离</span><br>	rightmargin=0em, <span class="hljs-comment">% 环境的右边界和列表之间的水平距离</span><br>	labelsep=0.5em, <span class="hljs-comment">% 包含标签的盒子与列表项的第一行文本之间的间隔</span><br>	labelwidth=2em <span class="hljs-comment">% 包含标签的盒子的正常宽度；若实际宽度更宽，则使用实际宽度。</span><br>&#125;<br><br><span class="hljs-comment">% 超链接</span><br>	 <span class="hljs-keyword">\hypersetup</span>&#123;<span class="hljs-comment">%</span><br><span class="hljs-comment">%         xetex,</span><br>		<span class="hljs-comment">% unicode=false, % hyperref 和 xetex 同时使用时不能开启 Unicode 选项.</span><br>         pdfstartview=FitH,<br>         CJKbookmarks=true,<br>         bookmarksnumbered=true,<br>         bookmarksopen=true,<br>         colorlinks, <span class="hljs-comment">%注释掉此项则交叉引用为彩色边框(将colorlinks和pdfborder同时注释掉)</span><br>         pdfborder=001,   <span class="hljs-comment">%注释掉此项则交叉引用为彩色边框</span><br>		 allcolors=black,<br>		 breaklinks=true&#125;<span class="hljs-comment">%</span><br><span class="hljs-comment">% \if@mcm@bwprint</span><br><span class="hljs-comment">% \AtBeginDocument&#123;\hypersetup&#123;hidelinks&#125;&#125;</span><br><span class="hljs-comment">% \else\relax\fi</span><br><span class="hljs-keyword">\pdfstringdefDisableCommands</span>&#123;<span class="hljs-comment">%</span><br>	<span class="hljs-keyword">\def</span><span class="hljs-keyword">\cftdotfill</span>&#123; &#125;<span class="hljs-comment">%</span><br>&#125;<br><span class="hljs-keyword">\lstnewenvironment</span>&#123;tcode&#125;<br>  &#123;<br>    <span class="hljs-keyword">\lstset</span>&#123;basicstyle = <span class="hljs-keyword">\small</span><span class="hljs-keyword">\ttfamily</span>,<br>        language=TeX,<br>        tabsize = 4,<br>        frame = single,<br>        escapechar = `,<br>        breaklines = true,<br>        breakatwhitespace = true,<br>        frameround = tttt,<br>    &#125;<br>  &#125;<br>  &#123;&#125;<br><span class="hljs-comment">%%% crefformat settings</span><br><span class="hljs-keyword">\crefformat</span>&#123;figure&#125;&#123;<span class="hljs-params">#2</span>图~<span class="hljs-params">#1</span><span class="hljs-params">#3</span>&#125;<br><span class="hljs-keyword">\crefrangeformat</span>&#123;figure&#125;&#123;图~(<span class="hljs-params">#3</span><span class="hljs-params">#1</span><span class="hljs-params">#4</span>)<span class="hljs-keyword">\;</span><span class="hljs-keyword">\~</span>&#123;&#125;<span class="hljs-keyword">\;</span>(<span class="hljs-params">#5</span><span class="hljs-params">#2</span><span class="hljs-params">#6</span>)&#125;<br><span class="hljs-keyword">\crefmultiformat</span>&#123;figure&#125;&#123;图~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123;和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123;，(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123;和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;<br><br><span class="hljs-keyword">\crefformat</span>&#123;table&#125;&#123;<span class="hljs-params">#2</span>表<span class="hljs-params">#1</span><span class="hljs-params">#3</span>&#125;<br><span class="hljs-keyword">\crefrangeformat</span>&#123;table&#125;&#123;表(<span class="hljs-params">#3</span><span class="hljs-params">#1</span><span class="hljs-params">#4</span>)<span class="hljs-keyword">\;</span><span class="hljs-keyword">\~</span>&#123;&#125;<span class="hljs-keyword">\;</span>(<span class="hljs-params">#5</span><span class="hljs-params">#2</span><span class="hljs-params">#6</span>)&#125;<br><span class="hljs-keyword">\crefmultiformat</span>&#123;table&#125;&#123;表~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123;和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123;，(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123;和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;<br><br><span class="hljs-keyword">\crefformat</span>&#123;equation&#125;&#123;<span class="hljs-params">#2</span>~(<span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;<br><span class="hljs-keyword">\crefrangeformat</span>&#123;equation&#125;&#123;~(<span class="hljs-params">#3</span><span class="hljs-params">#1</span><span class="hljs-params">#4</span>)<span class="hljs-keyword">\;</span><span class="hljs-keyword">\~</span>&#123;&#125;<span class="hljs-keyword">\;</span>(<span class="hljs-params">#5</span><span class="hljs-params">#2</span><span class="hljs-params">#6</span>)&#125;<br><span class="hljs-keyword">\crefmultiformat</span>&#123;equation&#125;&#123;~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123;，(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;<br><br><span class="hljs-keyword">\crefformat</span>&#123;definition&#125;&#123;<span class="hljs-params">#2</span><span class="hljs-keyword">\mcm@cap@definition</span>~<span class="hljs-params">#1</span><span class="hljs-params">#3</span>&#125;<br><span class="hljs-keyword">\crefrangeformat</span>&#123;definition&#125;&#123;<span class="hljs-keyword">\mcm@cap@definition</span>~(<span class="hljs-params">#3</span><span class="hljs-params">#1</span><span class="hljs-params">#4</span>)<span class="hljs-keyword">\;</span><span class="hljs-keyword">\~</span>&#123;&#125;<span class="hljs-keyword">\;</span>(<span class="hljs-params">#5</span><span class="hljs-params">#2</span><span class="hljs-params">#6</span>)&#125;<br><span class="hljs-keyword">\crefmultiformat</span>&#123;definition&#125;&#123;<span class="hljs-keyword">\mcm@cap@definition</span>~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123;，(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;<br><br><span class="hljs-keyword">\crefformat</span>&#123;theorem&#125;&#123;<span class="hljs-params">#2</span><span class="hljs-keyword">\mcm@cap@theorem</span>~<span class="hljs-params">#1</span><span class="hljs-params">#3</span>&#125;<br><span class="hljs-keyword">\crefrangeformat</span>&#123;theorem&#125;&#123;<span class="hljs-keyword">\mcm@cap@theorem</span>~(<span class="hljs-params">#3</span><span class="hljs-params">#1</span><span class="hljs-params">#4</span>)<span class="hljs-keyword">\;</span><span class="hljs-keyword">\~</span>&#123;&#125;<span class="hljs-keyword">\;</span>(<span class="hljs-params">#5</span><span class="hljs-params">#2</span><span class="hljs-params">#6</span>)&#125;<br><span class="hljs-keyword">\crefmultiformat</span>&#123;theorem&#125;&#123;<span class="hljs-keyword">\mcm@cap@theorem</span>~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123;，(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;<br><br><span class="hljs-keyword">\crefformat</span>&#123;lemma&#125;&#123;<span class="hljs-params">#2</span><span class="hljs-keyword">\mcm@cap@lemma</span>~<span class="hljs-params">#1</span><span class="hljs-params">#3</span>&#125;<br><span class="hljs-keyword">\crefrangeformat</span>&#123;lemma&#125;&#123;<span class="hljs-keyword">\mcm@cap@lemma</span>~(<span class="hljs-params">#3</span><span class="hljs-params">#1</span><span class="hljs-params">#4</span>)<span class="hljs-keyword">\;</span><span class="hljs-keyword">\~</span>&#123;&#125;<span class="hljs-keyword">\;</span>(<span class="hljs-params">#5</span><span class="hljs-params">#2</span><span class="hljs-params">#6</span>)&#125;<br><span class="hljs-keyword">\crefmultiformat</span>&#123;lemma&#125;&#123;<span class="hljs-keyword">\mcm@cap@lemma</span>~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123;，(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;<br><br><span class="hljs-keyword">\crefformat</span>&#123;corollary&#125;&#123;<span class="hljs-params">#2</span><span class="hljs-keyword">\mcm@cap@corollary</span>~<span class="hljs-params">#1</span><span class="hljs-params">#3</span>&#125;<br><span class="hljs-keyword">\crefrangeformat</span>&#123;corollary&#125;&#123;<span class="hljs-keyword">\mcm@cap@corollary</span>~(<span class="hljs-params">#3</span><span class="hljs-params">#1</span><span class="hljs-params">#4</span>)<span class="hljs-keyword">\;</span><span class="hljs-keyword">\~</span>&#123;&#125;<span class="hljs-keyword">\;</span>(<span class="hljs-params">#5</span><span class="hljs-params">#2</span><span class="hljs-params">#6</span>)&#125;<br><span class="hljs-keyword">\crefmultiformat</span>&#123;corollary&#125;&#123;<span class="hljs-keyword">\mcm@cap@corollary</span>~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123;，(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;<br><br><span class="hljs-keyword">\crefformat</span>&#123;assumption&#125;&#123;<span class="hljs-params">#2</span><span class="hljs-keyword">\mcm@cap@assumption</span>~<span class="hljs-params">#1</span><span class="hljs-params">#3</span>&#125;<br><span class="hljs-keyword">\crefrangeformat</span>&#123;assumption&#125;&#123;<span class="hljs-keyword">\mcm@cap@assumption</span>~(<span class="hljs-params">#3</span><span class="hljs-params">#1</span><span class="hljs-params">#4</span>)<span class="hljs-keyword">\;</span><span class="hljs-keyword">\~</span>&#123;&#125;<span class="hljs-keyword">\;</span>(<span class="hljs-params">#5</span><span class="hljs-params">#2</span><span class="hljs-params">#6</span>)&#125;<br><span class="hljs-keyword">\crefmultiformat</span>&#123;assumption&#125;&#123;<span class="hljs-keyword">\mcm@cap@assumption</span>~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123;，(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;<br><br><span class="hljs-keyword">\crefformat</span>&#123;conjecture&#125;&#123;<span class="hljs-params">#2</span><span class="hljs-keyword">\mcm@cap@conjecture</span>~<span class="hljs-params">#1</span><span class="hljs-params">#3</span>&#125;<br><span class="hljs-keyword">\crefrangeformat</span>&#123;conjecture&#125;&#123;<span class="hljs-keyword">\mcm@cap@conjecture</span>~(<span class="hljs-params">#3</span><span class="hljs-params">#1</span><span class="hljs-params">#4</span>)<span class="hljs-keyword">\;</span><span class="hljs-keyword">\~</span>&#123;&#125;<span class="hljs-keyword">\;</span>(<span class="hljs-params">#5</span><span class="hljs-params">#2</span><span class="hljs-params">#6</span>)&#125;<br><span class="hljs-keyword">\crefmultiformat</span>&#123;conjecture&#125;&#123;<span class="hljs-keyword">\mcm@cap@conjecture</span>~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123;，(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;<br><br><span class="hljs-keyword">\crefformat</span>&#123;axiom&#125;&#123;<span class="hljs-params">#2</span><span class="hljs-keyword">\mcm@cap@axiom</span>~<span class="hljs-params">#1</span><span class="hljs-params">#3</span>&#125;<br><span class="hljs-keyword">\crefrangeformat</span>&#123;axiom&#125;&#123;<span class="hljs-keyword">\mcm@cap@axiom</span>~(<span class="hljs-params">#3</span><span class="hljs-params">#1</span><span class="hljs-params">#4</span>)<span class="hljs-keyword">\;</span><span class="hljs-keyword">\~</span>&#123;&#125;<span class="hljs-keyword">\;</span>(<span class="hljs-params">#5</span><span class="hljs-params">#2</span><span class="hljs-params">#6</span>)&#125;<br><span class="hljs-keyword">\crefmultiformat</span>&#123;axiom&#125;&#123;<span class="hljs-keyword">\mcm@cap@axiom</span>~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123;，(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;<br><br><span class="hljs-keyword">\crefformat</span>&#123;principle&#125;&#123;<span class="hljs-params">#2</span><span class="hljs-keyword">\mcm@cap@principle</span>~<span class="hljs-params">#1</span><span class="hljs-params">#3</span>&#125;<br><span class="hljs-keyword">\crefrangeformat</span>&#123;principle&#125;&#123;<span class="hljs-keyword">\mcm@cap@principle</span>~(<span class="hljs-params">#3</span><span class="hljs-params">#1</span><span class="hljs-params">#4</span>)<span class="hljs-keyword">\;</span><span class="hljs-keyword">\~</span>&#123;&#125;<span class="hljs-keyword">\;</span>(<span class="hljs-params">#5</span><span class="hljs-params">#2</span><span class="hljs-params">#6</span>)&#125;<br><span class="hljs-keyword">\crefmultiformat</span>&#123;principle&#125;&#123;<span class="hljs-keyword">\mcm@cap@principle</span>~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123;，(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;<br><br><span class="hljs-keyword">\crefformat</span>&#123;problem&#125;&#123;<span class="hljs-params">#2</span><span class="hljs-keyword">\mcm@cap@problem</span>~<span class="hljs-params">#1</span><span class="hljs-params">#3</span>&#125;<br><span class="hljs-keyword">\crefrangeformat</span>&#123;problem&#125;&#123;<span class="hljs-keyword">\mcm@cap@problem</span>~(<span class="hljs-params">#3</span><span class="hljs-params">#1</span><span class="hljs-params">#4</span>)<span class="hljs-keyword">\;</span><span class="hljs-keyword">\~</span>&#123;&#125;<span class="hljs-keyword">\;</span>(<span class="hljs-params">#5</span><span class="hljs-params">#2</span><span class="hljs-params">#6</span>)&#125;<br><span class="hljs-keyword">\crefmultiformat</span>&#123;problem&#125;&#123;<span class="hljs-keyword">\mcm@cap@problem</span>~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123;，(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;<br><br><span class="hljs-keyword">\crefformat</span>&#123;example&#125;&#123;<span class="hljs-params">#2</span><span class="hljs-keyword">\mcm@cap@example</span>~<span class="hljs-params">#1</span><span class="hljs-params">#3</span>&#125;<br><span class="hljs-keyword">\crefrangeformat</span>&#123;example&#125;&#123;<span class="hljs-keyword">\mcm@cap@example</span>~(<span class="hljs-params">#3</span><span class="hljs-params">#1</span><span class="hljs-params">#4</span>)<span class="hljs-keyword">\;</span><span class="hljs-keyword">\~</span>&#123;&#125;<span class="hljs-keyword">\;</span>(<span class="hljs-params">#5</span><span class="hljs-params">#2</span><span class="hljs-params">#6</span>)&#125;<br><span class="hljs-keyword">\crefmultiformat</span>&#123;example&#125;&#123;<span class="hljs-keyword">\mcm@cap@example</span>~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123;，(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;<br><br><span class="hljs-keyword">\crefformat</span>&#123;proof&#125;&#123;<span class="hljs-params">#2</span><span class="hljs-keyword">\mcm@cap@proof</span>~<span class="hljs-params">#1</span><span class="hljs-params">#3</span>&#125;<br><span class="hljs-keyword">\crefrangeformat</span>&#123;proof&#125;&#123;<span class="hljs-keyword">\mcm@cap@proof</span>~(<span class="hljs-params">#3</span><span class="hljs-params">#1</span><span class="hljs-params">#4</span>)<span class="hljs-keyword">\;</span><span class="hljs-keyword">\~</span>&#123;&#125;<span class="hljs-keyword">\;</span>(<span class="hljs-params">#5</span><span class="hljs-params">#2</span><span class="hljs-params">#6</span>)&#125;<br><span class="hljs-keyword">\crefmultiformat</span>&#123;proof&#125;&#123;<span class="hljs-keyword">\mcm@cap@proof</span>~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123;，(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;<br><br><span class="hljs-keyword">\crefformat</span>&#123;solution&#125;&#123;<span class="hljs-params">#2</span><span class="hljs-keyword">\mcm@cap@solution</span>~<span class="hljs-params">#1</span><span class="hljs-params">#3</span>&#125;<br><span class="hljs-keyword">\crefrangeformat</span>&#123;solution&#125;&#123;<span class="hljs-keyword">\mcm@cap@solution</span>~(<span class="hljs-params">#3</span><span class="hljs-params">#1</span><span class="hljs-params">#4</span>)<span class="hljs-keyword">\;</span><span class="hljs-keyword">\~</span>&#123;&#125;<span class="hljs-keyword">\;</span>(<span class="hljs-params">#5</span><span class="hljs-params">#2</span><span class="hljs-params">#6</span>)&#125;<br><span class="hljs-keyword">\crefmultiformat</span>&#123;solution&#125;&#123;<span class="hljs-keyword">\mcm@cap@solution</span>~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123;，(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;&#123; 和~(<span class="hljs-params">#2</span><span class="hljs-params">#1</span><span class="hljs-params">#3</span>)&#125;<br><span class="hljs-comment">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span><br><br><span class="hljs-comment">%% Document Markup</span><br><br><span class="hljs-comment">% 生成封面, 使用\maketitle</span><br><span class="hljs-keyword">\renewcommand</span>&#123;<span class="hljs-keyword">\maketitle</span>&#125;&#123;<span class="hljs-keyword">\par</span><br>	<span class="hljs-keyword">\begingroup</span><br>      <span class="hljs-keyword">\newpage</span><br>      <span class="hljs-keyword">\global</span><span class="hljs-keyword">\@topnum</span><span class="hljs-keyword">\z@</span>   <span class="hljs-comment">% Prevents figures from going at top of page.</span><br>      <span class="hljs-keyword">\@maketitle</span><br>    <span class="hljs-keyword">\endgroup</span><br>  <span class="hljs-keyword">\global</span><span class="hljs-keyword">\let</span><span class="hljs-keyword">\thanks</span><span class="hljs-keyword">\relax</span><br>  <span class="hljs-keyword">\global</span><span class="hljs-keyword">\let</span><span class="hljs-keyword">\maketitle</span><span class="hljs-keyword">\relax</span><br>  <span class="hljs-keyword">\global</span><span class="hljs-keyword">\let</span><span class="hljs-keyword">\@maketitle</span><span class="hljs-keyword">\relax</span><br>  <span class="hljs-keyword">\global</span><span class="hljs-keyword">\let</span><span class="hljs-keyword">\@thanks</span><span class="hljs-keyword">\@empty</span><br>  <span class="hljs-keyword">\global</span><span class="hljs-keyword">\let</span><span class="hljs-keyword">\@author</span><span class="hljs-keyword">\@empty</span><br>  <span class="hljs-keyword">\global</span><span class="hljs-keyword">\let</span><span class="hljs-keyword">\@date</span><span class="hljs-keyword">\@empty</span><br>  <span class="hljs-keyword">\global</span><span class="hljs-keyword">\let</span><span class="hljs-keyword">\@title</span><span class="hljs-keyword">\@empty</span><br>  <span class="hljs-keyword">\global</span><span class="hljs-keyword">\let</span><span class="hljs-keyword">\title</span><span class="hljs-keyword">\relax</span><br>  <span class="hljs-keyword">\global</span><span class="hljs-keyword">\let</span><span class="hljs-keyword">\author</span><span class="hljs-keyword">\relax</span><br>  <span class="hljs-keyword">\global</span><span class="hljs-keyword">\let</span><span class="hljs-keyword">\date</span><span class="hljs-keyword">\relax</span><br>  <span class="hljs-keyword">\global</span><span class="hljs-keyword">\let</span><span class="hljs-keyword">\and</span><span class="hljs-keyword">\relax</span><br>&#125;<br><span class="hljs-keyword">\def</span><span class="hljs-keyword">\@maketitle</span>&#123;<span class="hljs-comment">%</span><br>  <span class="hljs-keyword">\newpage</span><br>  <span class="hljs-keyword">\if@mcm@preface</span><br>  <span class="hljs-keyword">\null</span><br> <span class="hljs-comment">% 承诺书</span><br> <span class="hljs-keyword">\vskip</span>2ex<br>  <span class="hljs-keyword">\thispagestyle</span>&#123;empty&#125;<br>  &#123;<span class="hljs-keyword">\zihao</span>&#123;4&#125;<span class="hljs-keyword">\noindent</span><span class="hljs-keyword">\mcm@commit@string@headname</span><span class="hljs-keyword">\\</span>[-8pt]<br>  <span class="hljs-keyword">\noindent</span><span class="hljs-keyword">\rule</span>[5pt]&#123;<span class="hljs-keyword">\textwidth</span>-1.34em&#125;&#123;.5pt&#125;<span class="hljs-keyword">\par</span>&#125;<br>  <span class="hljs-keyword">\begin</span>&#123;center&#125;<span class="hljs-comment">%</span><br>    &#123;<span class="hljs-keyword">\zihao</span>&#123;-3&#125;<span class="hljs-keyword">\bfseries</span><span class="hljs-keyword">\heiti</span> <span class="hljs-keyword">\mcm@commit@string@titlea</span> <span class="hljs-keyword">\par</span>&#125;<span class="hljs-comment">%</span><br>    &#123;<span class="hljs-keyword">\vskip</span>1ex<span class="hljs-keyword">\zihao</span>&#123;3&#125;<span class="hljs-keyword">\bfseries</span><span class="hljs-keyword">\songti</span> <span class="hljs-keyword">\mcm@commit@string@titleb</span> <span class="hljs-keyword">\par</span>&#125;<br>  <span class="hljs-keyword">\end</span>&#123;center&#125;<br>    &#123;<span class="hljs-keyword">\zihao</span>&#123;-4&#125; <span class="hljs-keyword">\mcm@commit@string@contents</span> <span class="hljs-keyword">\par</span>&#125;<br>    &#123;<span class="hljs-keyword">\vskip</span>1ex<span class="hljs-keyword">\zihao</span>&#123;-4&#125;<br>    <span class="hljs-keyword">\renewcommand</span>&#123;<span class="hljs-keyword">\ULthickness</span>&#125;&#123;0.4pt&#125;<span class="hljs-keyword">\setlength</span>&#123;<span class="hljs-keyword">\ULdepth</span>&#125;&#123;2pt&#125;<br>    <span class="hljs-keyword">\hspace</span>*&#123;2em&#125;<span class="hljs-keyword">\mcm@commit@string@problemnum</span><span class="hljs-keyword">\uline</span>&#123;<span class="hljs-keyword">\hspace</span>&#123;1em&#125;<span class="hljs-keyword">\mcm@tokens@tihao</span><span class="hljs-keyword">\hfill</span>&#125;<span class="hljs-keyword">\makebox</span>[0.66em]&#123;&#125;<span class="hljs-keyword">\par</span><br>    <span class="hljs-keyword">\mcm@commit@string@signupnum</span><span class="hljs-keyword">\uline</span>&#123;<span class="hljs-keyword">\hspace</span>&#123;1em&#125;<span class="hljs-keyword">\mcm@tokens@baominghao</span><span class="hljs-keyword">\hfill</span>&#125;<span class="hljs-keyword">\makebox</span>[0.66em]&#123;&#125;<span class="hljs-keyword">\par</span><br>    <span class="hljs-keyword">\mcm@commit@string@schoolname</span><span class="hljs-keyword">\uline</span>&#123;<span class="hljs-keyword">\hfill</span><span class="hljs-keyword">\mcm@tokens@schoolname</span><span class="hljs-keyword">\hfill</span>&#125;<span class="hljs-keyword">\makebox</span>[0.66em]&#123;&#125;<span class="hljs-keyword">\par</span><br>    <span class="hljs-keyword">\newlength</span>&#123;<span class="hljs-keyword">\mcm@lenB</span>&#125;<br>    <span class="hljs-keyword">\settowidth</span>&#123;<span class="hljs-keyword">\mcm@lenB</span>&#125;&#123;<span class="hljs-keyword">\mcm@commit@string@membername</span><span class="hljs-keyword">\hspace</span>&#123;1em&#125;1.&#125;<br>    <span class="hljs-keyword">\setlength</span>&#123;<span class="hljs-keyword">\mcm@lenB</span>&#125;&#123;<span class="hljs-keyword">\textwidth</span>-<span class="hljs-keyword">\mcm@lenB</span>&#125;<br>    <span class="hljs-comment">% 不这样做右边难以对齐!</span><br>    <span class="hljs-keyword">\mcm@commit@string@membername</span><br>    <span class="hljs-keyword">\begin</span>&#123;minipage&#125;[t]&#123;<span class="hljs-keyword">\mcm@lenB</span>&#125;<br>   	1.<span class="hljs-keyword">\uline</span>&#123;<span class="hljs-keyword">\hspace</span>&#123;1em&#125;<span class="hljs-keyword">\mcm@tokens@membera</span><span class="hljs-keyword">\hfill</span>&#125; <span class="hljs-keyword">\makebox</span>[0.46em]&#123;&#125;<span class="hljs-keyword">\par</span><br>   	2.<span class="hljs-keyword">\uline</span>&#123;<span class="hljs-keyword">\hspace</span>&#123;1em&#125;<span class="hljs-keyword">\mcm@tokens@memberb</span><span class="hljs-keyword">\hfill</span>&#125; <span class="hljs-keyword">\makebox</span>[0.46em]&#123;&#125;<span class="hljs-keyword">\par</span><br>   	3.<span class="hljs-keyword">\uline</span>&#123;<span class="hljs-keyword">\hspace</span>&#123;1em&#125;<span class="hljs-keyword">\mcm@tokens@memberc</span><span class="hljs-keyword">\hfill</span>&#125; <span class="hljs-keyword">\makebox</span>[0.46em]&#123;&#125;<span class="hljs-keyword">\par</span><br>   <span class="hljs-keyword">\end</span>&#123;minipage&#125;<span class="hljs-keyword">\par</span><span class="hljs-keyword">\vskip</span>1ex<br>    <span class="hljs-keyword">\mcm@commit@string@supervisorname</span><span class="hljs-keyword">\uline</span>&#123;<span class="hljs-keyword">\hspace</span>&#123;1em&#125;<span class="hljs-keyword">\mcm@tokens@supervisor</span><span class="hljs-keyword">\hfill</span>&#125;<span class="hljs-keyword">\makebox</span>[0.66em]&#123;&#125;<span class="hljs-keyword">\par</span><br>    <span class="hljs-keyword">\hspace</span>&#123;0.1cm&#125; （&#123;<span class="hljs-keyword">\kaishu</span> 指导教师签名意味着对参赛队的行为和论文的真实性负责&#125;）<br>    <span class="hljs-comment">%&#123;\kaishu\mcm@commit@string@inform\par&#125;</span><br>    <span class="hljs-keyword">\vskip</span>2ex<br>    <span class="hljs-keyword">\newlength</span>&#123;<span class="hljs-keyword">\mcm@lenA</span>&#125;<br>    <span class="hljs-keyword">\settowidth</span>&#123;<span class="hljs-keyword">\mcm@lenA</span>&#125;&#123;请仔细核对，提交后将不再允许做任何修改。如&#125;<span class="hljs-comment">% 虽然&quot;日期&quot;刚好在&quot;错误&quot;下面, 但注意&quot;日期&quot;还会缩进, 所以要省去&quot;填写&quot;&quot;两字</span><br>    <span class="hljs-keyword">\hspace</span>*&#123;<span class="hljs-keyword">\mcm@lenA</span>&#125;<span class="hljs-keyword">\mcm@commit@string@date</span><span class="hljs-keyword">\hspace</span>&#123;0.5em&#125;<span class="hljs-keyword">\uline</span>&#123;<span class="hljs-keyword">\hfill</span><span class="hljs-keyword">\hspace</span>&#123;1em&#125;<span class="hljs-keyword">\mcm@tokens@yearinput</span><span class="hljs-keyword">\hspace</span>&#123;1em&#125;<span class="hljs-keyword">\hfill</span>&#125;<span class="hljs-comment">%</span><br>    <span class="hljs-keyword">\mcm@commit@string@year</span><span class="hljs-keyword">\uline</span>&#123;<span class="hljs-keyword">\hfill</span><span class="hljs-keyword">\mcm@tokens@monthinput</span><span class="hljs-keyword">\hfill</span>&#125;<span class="hljs-keyword">\mcm@commit@string@month</span><span class="hljs-comment">%</span><br>    <span class="hljs-keyword">\uline</span>&#123;<span class="hljs-keyword">\hfill</span><span class="hljs-keyword">\mcm@tokens@dayinput</span><span class="hljs-keyword">\hfill</span>&#125;<span class="hljs-keyword">\mcm@commit@string@day</span><span class="hljs-keyword">\makebox</span>[1em]&#123;&#125;<span class="hljs-keyword">\par</span>&#125;<br>    <span class="hljs-keyword">\vskip</span>1ex<br>    &#123;<span class="hljs-keyword">\kaishu</span><span class="hljs-keyword">\bfseries</span><span class="hljs-keyword">\mcm@commit@string@inform</span><span class="hljs-keyword">\par</span>&#125;<br>	<span class="hljs-keyword">\vfill</span><br>	<span class="hljs-keyword">\null</span><br><span class="hljs-comment">% 编号专用页</span><br>	<span class="hljs-keyword">\else</span><br>	<span class="hljs-keyword">\fi</span><br>	<span class="hljs-keyword">\makeothertitle</span><br>	&#125;<br><br><span class="hljs-comment">%% 定义 编号专用页</span><br><span class="hljs-keyword">\def</span><span class="hljs-keyword">\makeothertitle</span>&#123;<span class="hljs-comment">%</span><br>  <span class="hljs-keyword">\if@mcm@preface</span><br>  <span class="hljs-keyword">\par</span><br><span class="hljs-keyword">\newpage</span><br><span class="hljs-keyword">\null</span><br><span class="hljs-keyword">\thispagestyle</span>&#123;empty&#125;<br>&#123;<span class="hljs-keyword">\zihao</span>&#123;4&#125;<span class="hljs-keyword">\noindent</span><span class="hljs-keyword">\begin</span>&#123;tabularx&#125;&#123;<span class="hljs-keyword">\textwidth</span>&#125;&#123;cXcX@&#123;&#125;&#125;<br><span class="hljs-keyword">\mcm@numberpage@string@headname</span> <span class="hljs-built_in">&amp;</span> <span class="hljs-built_in">&amp;</span> <span class="hljs-keyword">\mcm@numberpage@string@allcountrynum</span><span class="hljs-built_in">&amp;</span><span class="hljs-keyword">\\</span>[-5pt]<br><span class="hljs-keyword">\mcm@numberpage@string@headnameb</span> <span class="hljs-built_in">&amp;</span> <span class="hljs-built_in">&amp;</span><span class="hljs-keyword">\mcm@numberpage@string@allcountrynumb</span><span class="hljs-built_in">&amp;</span><span class="hljs-keyword">\\</span><br><span class="hljs-keyword">\cline</span>&#123;2-2&#125;<span class="hljs-keyword">\cline</span>&#123;4-4&#125;<br><span class="hljs-keyword">\end</span>&#123;tabularx&#125;<br><br><span class="hljs-keyword">\vspace</span>*&#123;1.2em&#125;<br><br><span class="hljs-keyword">\noindent</span><span class="hljs-keyword">\rule</span>&#123;<span class="hljs-keyword">\textwidth</span>&#125;&#123;1pt&#125;<span class="hljs-keyword">\par</span>&#125;<br><span class="hljs-keyword">\begin</span>&#123;center&#125;<br>&#123;<span class="hljs-keyword">\zihao</span>&#123;4&#125;<span class="hljs-keyword">\bfseries</span><span class="hljs-keyword">\heiti</span> <span class="hljs-keyword">\mcm@numberpage@string@titlea</span><span class="hljs-keyword">\par</span>&#125;<br>&#123;<span class="hljs-keyword">\vskip</span>1ex<span class="hljs-keyword">\zihao</span>&#123;3&#125;<span class="hljs-keyword">\songti</span> <span class="hljs-keyword">\bfseries</span><span class="hljs-keyword">\mcm@numberpage@string@titleb</span><span class="hljs-keyword">\par</span>&#125;<br><span class="hljs-keyword">\end</span>&#123;center&#125;<span class="hljs-keyword">\par</span><br>&#123;<span class="hljs-comment">%</span><br><span class="hljs-keyword">\zihao</span>&#123;4&#125;<br><span class="hljs-keyword">\vskip</span>3em<br><span class="hljs-keyword">\hspace</span>*&#123;2em&#125;<span class="hljs-keyword">\mcm@numberpage@string@appraiselog</span><br><span class="hljs-keyword">\par</span><br><span class="hljs-keyword">\newlength</span>&#123;<span class="hljs-keyword">\mcm@lenC</span>&#125;<br><span class="hljs-keyword">\setlength</span>&#123;<span class="hljs-keyword">\mcm@lenC</span>&#125;&#123;<span class="hljs-keyword">\textwidth</span>-8.72em&#125;<br><span class="hljs-keyword">\setlength</span>&#123;<span class="hljs-keyword">\mcm@lenC</span>&#125;&#123;<span class="hljs-keyword">\mcm@lenC</span>/6&#125;<br><span class="hljs-keyword">\newlength</span>&#123;<span class="hljs-keyword">\mcm@lenD</span>&#125;<br><span class="hljs-keyword">\settoheight</span>&#123;<span class="hljs-keyword">\mcm@lenD</span>&#125;&#123;<span class="hljs-keyword">\mcm@numberpage@string@reviewer</span>&#125;<br><span class="hljs-keyword">\setlength</span>&#123;<span class="hljs-keyword">\mcm@lenD</span>&#125;&#123;<span class="hljs-keyword">\mcm@lenD</span>+2em&#125;<br><span class="hljs-keyword">\newlength</span>&#123;<span class="hljs-keyword">\mcm@lenF</span>&#125;<br><span class="hljs-keyword">\settoheight</span>&#123;<span class="hljs-keyword">\mcm@lenF</span>&#125;&#123;<span class="hljs-keyword">\mcm@numberpage@string@remarks</span>&#125;<br><span class="hljs-keyword">\setlength</span>&#123;<span class="hljs-keyword">\mcm@lenF</span>&#125;&#123;<span class="hljs-keyword">\mcm@lenF</span>+2em&#125;<br><span class="hljs-keyword">\newcolumntype</span>&#123;P&#125;&#123;@&#123;&#125;p&#123;<span class="hljs-keyword">\mcm@lenC</span>&#125;@&#123;&#125;&#125;<br><span class="hljs-keyword">\hspace</span>*&#123;1.5em&#125;<span class="hljs-keyword">\begin</span>&#123;tabular&#125;&#123;|!&#123;<span class="hljs-keyword">\hspace</span>&#123;4pt&#125;&#125;c!&#123;<span class="hljs-keyword">\hspace</span>&#123;4pt&#125;&#125;|*&#123;6&#125;&#123;P|&#125;&#125;<br> <span class="hljs-keyword">\hline</span><br> <span class="hljs-keyword">\rule</span>&#123;0pt&#125;&#123;<span class="hljs-keyword">\mcm@lenD</span>&#125;<span class="hljs-keyword">\raisebox</span>&#123;0.6em&#125;[0pt][0pt]&#123;<span class="hljs-keyword">\mcm@numberpage@string@reviewer</span>&#125; <span class="hljs-built_in">&amp;</span> <span class="hljs-built_in">&amp;</span> <span class="hljs-built_in">&amp;</span> <span class="hljs-built_in">&amp;</span> <span class="hljs-built_in">&amp;</span> <span class="hljs-built_in">&amp;</span>  <span class="hljs-keyword">\\</span><span class="hljs-keyword">\cline</span>&#123;1-7&#125;<br> <span class="hljs-keyword">\rule</span>&#123;0pt&#125;&#123;<span class="hljs-keyword">\mcm@lenF</span>&#125;<span class="hljs-keyword">\raisebox</span>&#123;0.6em&#125;[0pt][0pt]&#123;<span class="hljs-keyword">\mcm@numberpage@string@remarks</span>&#125; <span class="hljs-built_in">&amp;</span> <span class="hljs-built_in">&amp;</span> <span class="hljs-built_in">&amp;</span> <span class="hljs-built_in">&amp;</span> <span class="hljs-built_in">&amp;</span> <span class="hljs-built_in">&amp;</span>  <span class="hljs-keyword">\\</span><br> <span class="hljs-keyword">\hline</span><br><span class="hljs-keyword">\end</span>&#123;tabular&#125;<span class="hljs-keyword">\par</span><br><span class="hljs-keyword">\vskip</span>5em<br><span class="hljs-keyword">\hspace</span>*&#123;2em&#125;<span class="hljs-keyword">\mcm@numberpage@string@countrynum</span>&#125;<br><br><span class="hljs-keyword">\vfill</span><br>&#123;<span class="hljs-keyword">\zihao</span>&#123;-4&#125;<span class="hljs-keyword">\kaishu</span><span class="hljs-keyword">\bfseries</span><span class="hljs-keyword">\mcm@numberpage@string@inform</span><span class="hljs-keyword">\par</span>&#125;<br><br><span class="hljs-keyword">\null</span><br><span class="hljs-keyword">\newpage</span><br><span class="hljs-keyword">\null</span><br><span class="hljs-keyword">\setcounter</span>&#123;page&#125;&#123;1&#125;<br>&#123;<span class="hljs-keyword">\centering</span> <span class="hljs-keyword">\zihao</span>&#123;3&#125;<span class="hljs-keyword">\bfseries</span> <span class="hljs-keyword">\@title</span><span class="hljs-keyword">\par</span>&#125;<br><span class="hljs-keyword">\vskip</span>1ex<br><span class="hljs-keyword">\else</span><br><span class="hljs-keyword">\setcounter</span>&#123;page&#125;&#123;1&#125;<br>&#123;<span class="hljs-keyword">\centering</span> <span class="hljs-keyword">\zihao</span>&#123;3&#125;<span class="hljs-keyword">\bfseries</span> <span class="hljs-keyword">\@title</span><span class="hljs-keyword">\par</span>&#125;<br><span class="hljs-keyword">\vskip</span>1ex<br><span class="hljs-keyword">\fi</span><br>&#125;<br><br><span class="hljs-comment">% 中文标题名称设置</span><br><span class="hljs-keyword">\renewcommand</span><span class="hljs-keyword">\contentsname</span>&#123;<span class="hljs-keyword">\mcm@cap@contentsname</span>&#125;<br><span class="hljs-keyword">\renewcommand</span><span class="hljs-keyword">\listfigurename</span>&#123;<span class="hljs-keyword">\mcm@cap@listfigurename</span>&#125;<br><span class="hljs-keyword">\renewcommand</span><span class="hljs-keyword">\listtablename</span>&#123;<span class="hljs-keyword">\mcm@cap@listtablename</span>&#125;<br><span class="hljs-keyword">\renewcommand</span><span class="hljs-keyword">\refname</span>&#123;<span class="hljs-keyword">\mcm@cap@refname</span>&#125;<br><span class="hljs-keyword">\renewcommand</span><span class="hljs-keyword">\indexname</span>&#123;<span class="hljs-keyword">\mcm@cap@indexname</span>&#125;<br><span class="hljs-keyword">\renewcommand</span><span class="hljs-keyword">\figurename</span>&#123;<span class="hljs-keyword">\mcm@cap@figurename</span>&#125;<br><span class="hljs-keyword">\renewcommand</span><span class="hljs-keyword">\tablename</span>&#123;<span class="hljs-keyword">\mcm@cap@tablename</span>&#125;<br><span class="hljs-keyword">\renewcommand</span><span class="hljs-keyword">\appendixname</span>&#123;<span class="hljs-keyword">\mcm@cap@appendixname</span>&#125;<br><span class="hljs-keyword">\renewcommand</span><span class="hljs-keyword">\abstractname</span>&#123;<span class="hljs-keyword">\mcm@cap@abstractname</span>&#125;<br><br><span class="hljs-comment">% 中文标题格式设置</span><br><span class="hljs-comment">% 目录深度</span><br><span class="hljs-keyword">\setcounter</span>&#123;secnumdepth&#125;&#123;3&#125;<br><span class="hljs-comment">% 节标题格式, 居中, 使用\chinese命令修改计数器</span><br><span class="hljs-keyword">\def</span><span class="hljs-keyword">\@seccntformat</span><span class="hljs-params">#1</span>&#123;<span class="hljs-keyword">\csname</span> the<span class="hljs-params">#1</span><span class="hljs-keyword">\endcsname</span><span class="hljs-keyword">\ </span>&#125;<br><span class="hljs-keyword">\renewcommand</span><span class="hljs-keyword">\thesection</span>&#123;<span class="hljs-keyword">\chinese</span>&#123;section&#125;、&#125;<br><span class="hljs-keyword">\renewcommand</span><span class="hljs-keyword">\thesubsection</span>&#123;<span class="hljs-keyword">\arabic</span>&#123;section&#125;<span class="hljs-keyword">\thinspace</span>.<span class="hljs-keyword">\thinspace</span><span class="hljs-keyword">\arabic</span>&#123;subsection&#125;&#125;<br><span class="hljs-keyword">\renewcommand</span><span class="hljs-keyword">\thesubsubsection</span>&#123;<span class="hljs-keyword">\thesubsection</span><span class="hljs-keyword">\thinspace</span>.<span class="hljs-keyword">\thinspace</span><span class="hljs-keyword">\arabic</span>&#123;subsubsection&#125;&#125;<br><span class="hljs-keyword">\renewcommand</span><span class="hljs-keyword">\section</span>&#123;<span class="hljs-keyword">\@startsection</span>&#123;section&#125;&#123;1&#125;&#123;<span class="hljs-keyword">\z@</span>&#125;<span class="hljs-comment">%</span><br> 	&#123;-3.5ex <span class="hljs-keyword">\@plus</span> -1ex <span class="hljs-keyword">\@minus</span> -.2ex&#125;<span class="hljs-comment">%</span><br>	&#123;2.3ex <span class="hljs-keyword">\@plus</span>.2ex&#125;<span class="hljs-comment">%</span><br>	&#123;<span class="hljs-keyword">\centering</span><span class="hljs-keyword">\normalfont</span><span class="hljs-keyword">\Large</span><span class="hljs-keyword">\bfseries</span>&#125;&#125;<br><span class="hljs-keyword">\renewcommand</span><span class="hljs-keyword">\subsection</span>&#123;<span class="hljs-keyword">\@startsection</span>&#123;subsection&#125;&#123;2&#125;&#123;<span class="hljs-keyword">\z@</span>&#125;<span class="hljs-comment">%</span><br>	&#123;-3.25ex<span class="hljs-keyword">\@plus</span> -1ex <span class="hljs-keyword">\@minus</span> -.2ex&#125;<span class="hljs-comment">%</span><br>	&#123;1.5ex <span class="hljs-keyword">\@plus</span> .2ex&#125;<span class="hljs-comment">%</span><br>	&#123;<span class="hljs-keyword">\normalfont</span><span class="hljs-keyword">\large</span><span class="hljs-keyword">\bfseries</span>&#125;&#125;<br><span class="hljs-keyword">\renewcommand</span><span class="hljs-keyword">\subsubsection</span>&#123;<span class="hljs-keyword">\@startsection</span>&#123;subsubsection&#125;&#123;3&#125;&#123;<span class="hljs-keyword">\z@</span>&#125;<span class="hljs-comment">%</span><br>	&#123;-3.25ex<span class="hljs-keyword">\@plus</span> -1ex <span class="hljs-keyword">\@minus</span> -.2ex&#125;<span class="hljs-comment">%</span><br>	&#123;1.5ex <span class="hljs-keyword">\@plus</span> .2ex&#125;<span class="hljs-comment">%</span><br>	&#123;<span class="hljs-keyword">\normalfont</span><span class="hljs-keyword">\normalsize</span><span class="hljs-keyword">\bfseries</span>&#125;&#125;<br><span class="hljs-keyword">\renewcommand</span><span class="hljs-keyword">\paragraph</span>&#123;<span class="hljs-keyword">\@startsection</span>&#123;paragraph&#125;&#123;4&#125;&#123;<span class="hljs-keyword">\z@</span>&#125;<span class="hljs-comment">%</span><br>	&#123;3.25ex <span class="hljs-keyword">\@plus</span>1ex <span class="hljs-keyword">\@minus</span>.2ex&#125;<span class="hljs-comment">%</span><br>	&#123;-1em&#125;<span class="hljs-comment">%</span><br>	&#123;<span class="hljs-keyword">\normalfont</span><span class="hljs-keyword">\normalsize</span><span class="hljs-keyword">\bfseries</span>&#125;&#125;<br><span class="hljs-keyword">\renewcommand</span><span class="hljs-keyword">\subparagraph</span>&#123;<span class="hljs-keyword">\@startsection</span>&#123;subparagraph&#125;&#123;5&#125;&#123;<span class="hljs-keyword">\parindent</span>&#125;<span class="hljs-comment">%</span><br>	 &#123;3.25ex <span class="hljs-keyword">\@plus</span>1ex <span class="hljs-keyword">\@minus</span> .2ex&#125;<span class="hljs-comment">%</span><br>	 &#123;-1em&#125;<span class="hljs-comment">%</span><br>	 &#123;<span class="hljs-keyword">\normalfont</span><span class="hljs-keyword">\normalsize</span><span class="hljs-keyword">\bfseries</span>&#125;&#125;<br><br><span class="hljs-comment">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span><br><span class="hljs-comment">%% Define new environment and command</span><br><span class="hljs-comment">%% 摘要两个字设置为 4 号.</span><br><span class="hljs-comment">%% 定义摘要环境</span><br><span class="hljs-keyword">\renewenvironment</span>&#123;abstract&#125;&#123;<span class="hljs-comment">%</span><br><span class="hljs-keyword">\if@twocolumn</span><br>		<span class="hljs-keyword">\section</span>*&#123;<span class="hljs-keyword">\abstractname</span>&#125;<span class="hljs-comment">%</span><br>	<span class="hljs-keyword">\else</span><br>	 <span class="hljs-keyword">\begin</span>&#123;center&#125;<span class="hljs-comment">%</span><br>	&#123;<span class="hljs-keyword">\zihao</span>&#123;4&#125;<span class="hljs-keyword">\bfseries</span> <span class="hljs-keyword">\abstractname</span><span class="hljs-keyword">\vspace</span>&#123;-.5em&#125;<span class="hljs-keyword">\vspace</span>&#123;<span class="hljs-keyword">\z@</span>&#125;&#125;<span class="hljs-comment">%</span><br>	 <span class="hljs-keyword">\end</span>&#123;center&#125;<span class="hljs-comment">%</span><br> 	 <span class="hljs-keyword">\quotation</span><br>	<span class="hljs-keyword">\fi</span>&#125;<br>	&#123;<span class="hljs-keyword">\if@twocolumn</span><span class="hljs-keyword">\else</span><span class="hljs-keyword">\endquotation</span><span class="hljs-keyword">\newpage</span><span class="hljs-keyword">\null</span><span class="hljs-keyword">\fi</span>&#125;<br><span class="hljs-keyword">\renewenvironment</span>&#123;quotation&#125;<br>	&#123;<span class="hljs-keyword">\list</span>&#123;&#125;&#123;<span class="hljs-keyword">\listparindent</span> 2em<span class="hljs-comment">%</span><br>	 <span class="hljs-keyword">\itemindent</span> <span class="hljs-keyword">\listparindent</span><br>	 <span class="hljs-keyword">\rightmargin</span><span class="hljs-keyword">\z@</span><br>	 <span class="hljs-keyword">\leftmargin</span><span class="hljs-keyword">\z@</span><br>	 <span class="hljs-keyword">\parsep</span> <span class="hljs-keyword">\z@</span> <span class="hljs-keyword">\@plus</span><span class="hljs-keyword">\p@</span>&#125;<span class="hljs-comment">%</span><br>	<span class="hljs-keyword">\item</span><span class="hljs-keyword">\relax</span>&#125;<br>	&#123;<span class="hljs-keyword">\endlist</span>&#125;<br><br><span class="hljs-keyword">\newcommand</span><span class="hljs-keyword">\keywords</span>[1]&#123;<span class="hljs-comment">%</span><br>	<span class="hljs-keyword">\renewcommand</span>&#123;<span class="hljs-keyword">\mcm@tokens@keywords</span>&#125;&#123;<span class="hljs-params">#1</span>&#125;<br>	<span class="hljs-keyword">\par</span><br>	<span class="hljs-keyword">\vskip</span>1ex<br>	&#123;<span class="hljs-keyword">\noindent</span><span class="hljs-keyword">\zihao</span>&#123;-4&#125;<span class="hljs-keyword">\heiti</span><span class="hljs-keyword">\mcm@cap@keywordsname</span>：&#125;~&#123;<span class="hljs-keyword">\mcm@tokens@keywords</span>&#125;<br>	&#125;<br><span class="hljs-comment">% 定义附录</span><br><br><span class="hljs-comment">% \renewcommand&#123;\setthesection&#125;&#123;\appendixname\Alph&#123;section&#125;&#125;</span><br><span class="hljs-comment">% \renewcommand\appendix&#123;\par</span><br>	<span class="hljs-comment">% \setcounter&#123;section&#125;&#123;0&#125;%</span><br>	 <span class="hljs-comment">% \setcounter&#123;subsection&#125;&#123;0&#125;%</span><br>	<span class="hljs-comment">% \gdef\thesection&#123;\appendixname\@Alph\c@section&#125;&#125;</span><br><span class="hljs-comment">% 重定义参考文献环境</span><br><span class="hljs-keyword">\renewenvironment</span>&#123;thebibliography&#125;[1]<br>     &#123;<span class="hljs-keyword">\section</span>*&#123;<span class="hljs-keyword">\refname</span>&#125;<span class="hljs-comment">%</span><br>      <span class="hljs-keyword">\@mkboth</span>&#123;<span class="hljs-keyword">\MakeUppercase</span><span class="hljs-keyword">\refname</span>&#125;&#123;<span class="hljs-keyword">\MakeUppercase</span><span class="hljs-keyword">\refname</span>&#125;<span class="hljs-comment">%</span><br>      <span class="hljs-keyword">\list</span>&#123;<span class="hljs-keyword">\@biblabel</span>&#123;<span class="hljs-keyword">\@arabic</span><span class="hljs-keyword">\c@enumiv</span>&#125;&#125;<span class="hljs-comment">%</span><br>           &#123;<span class="hljs-keyword">\settowidth</span><span class="hljs-keyword">\labelwidth</span>&#123;<span class="hljs-keyword">\@biblabel</span>&#123;<span class="hljs-params">#1</span>&#125;&#125;<span class="hljs-comment">%</span><br>            <span class="hljs-keyword">\leftmargin</span><span class="hljs-keyword">\labelwidth</span><br>            <span class="hljs-keyword">\advance</span><span class="hljs-keyword">\leftmargin</span><span class="hljs-keyword">\labelsep</span><br>            <span class="hljs-keyword">\@openbib@code</span><br>            <span class="hljs-keyword">\usecounter</span>&#123;enumiv&#125;<span class="hljs-comment">%</span><br>            <span class="hljs-keyword">\let</span><span class="hljs-keyword">\p@enumiv</span><span class="hljs-keyword">\@empty</span><br>            <span class="hljs-keyword">\renewcommand</span><span class="hljs-keyword">\theenumiv</span>&#123;<span class="hljs-keyword">\@arabic</span><span class="hljs-keyword">\c@enumiv</span>&#125;&#125;<span class="hljs-comment">%</span><br>      <span class="hljs-keyword">\sloppy</span><br>      <span class="hljs-keyword">\clubpenalty</span>4000<br>      <span class="hljs-keyword">\@clubpenalty</span> <span class="hljs-keyword">\clubpenalty</span><br>      <span class="hljs-keyword">\widowpenalty</span>4000<span class="hljs-comment">%</span><br>      <span class="hljs-keyword">\sfcode</span>`<span class="hljs-keyword">\.</span><span class="hljs-keyword">\@m</span>&#125;<br>     &#123;<span class="hljs-keyword">\def</span><span class="hljs-keyword">\@noitemerr</span><br>       &#123;<span class="hljs-keyword">\@latex@warning</span>&#123;Empty `thebibliography&#x27; environment&#125;&#125;<span class="hljs-comment">%</span><br>      <span class="hljs-keyword">\endlist</span>&#125;<br><br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\tihao</span>[1]&#123;<span class="hljs-comment">%</span><br>	<span class="hljs-keyword">\renewcommand</span>&#123;<span class="hljs-keyword">\mcm@tokens@tihao</span>&#125;&#123;<span class="hljs-params">#1</span>&#125;&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\baominghao</span>[1]&#123;<span class="hljs-comment">%</span><br>	<span class="hljs-keyword">\renewcommand</span>&#123;<span class="hljs-keyword">\mcm@tokens@baominghao</span>&#125;&#123;<span class="hljs-params">#1</span>&#125;&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\schoolname</span>[1]&#123;<span class="hljs-comment">%</span><br>	<span class="hljs-keyword">\renewcommand</span>&#123;<span class="hljs-keyword">\mcm@tokens@schoolname</span>&#125;&#123;<span class="hljs-params">#1</span>&#125;&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\membera</span>[1]&#123;<span class="hljs-comment">%</span><br>	<span class="hljs-keyword">\renewcommand</span>&#123;<span class="hljs-keyword">\mcm@tokens@membera</span>&#125;&#123;<span class="hljs-params">#1</span>&#125;&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\memberb</span>[1]&#123;<span class="hljs-comment">%</span><br>	<span class="hljs-keyword">\renewcommand</span>&#123;<span class="hljs-keyword">\mcm@tokens@memberb</span>&#125;&#123;<span class="hljs-params">#1</span>&#125;&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\memberc</span>[1]&#123;<span class="hljs-comment">%</span><br>	<span class="hljs-keyword">\renewcommand</span>&#123;<span class="hljs-keyword">\mcm@tokens@memberc</span>&#125;&#123;<span class="hljs-params">#1</span>&#125;&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\supervisor</span>[1]&#123;<span class="hljs-comment">%</span><br>	<span class="hljs-keyword">\renewcommand</span>&#123;<span class="hljs-keyword">\mcm@tokens@supervisor</span>&#125;&#123;<span class="hljs-params">#1</span>&#125;&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\yearinput</span>[1]&#123;<span class="hljs-comment">%</span><br>	<span class="hljs-keyword">\renewcommand</span>&#123;<span class="hljs-keyword">\mcm@tokens@yearinput</span>&#125;&#123;<span class="hljs-params">#1</span>&#125;&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\monthinput</span>[1]&#123;<span class="hljs-comment">%</span><br>	<span class="hljs-keyword">\renewcommand</span>&#123;<span class="hljs-keyword">\mcm@tokens@monthinput</span>&#125;&#123;<span class="hljs-params">#1</span>&#125;&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\dayinput</span>[1]&#123;<span class="hljs-comment">%</span><br>	<span class="hljs-keyword">\renewcommand</span>&#123;<span class="hljs-keyword">\mcm@tokens@dayinput</span>&#125;&#123;<span class="hljs-params">#1</span>&#125;&#125;<br><br><span class="hljs-comment">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span><br><br><span class="hljs-comment">%% Initialization</span><br> <span class="hljs-comment">%%%数学定理相关的常量</span><br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\mcm@cap@definition</span>&#125;&#123;定义&#125;<br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\mcm@cap@theorem</span>&#125;&#123;定理&#125;<br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\mcm@cap@lemma</span>&#125;&#123;引理&#125;<br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\mcm@cap@corollary</span>&#125;&#123;推论&#125;<br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\mcm@cap@assumption</span>&#125;&#123;假设&#125;<br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\mcm@cap@conjecture</span>&#125;&#123;猜想&#125;<br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\mcm@cap@axiom</span>&#125;&#123;公理&#125;<br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\mcm@cap@principle</span>&#125;&#123;定律&#125;<br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\mcm@cap@problem</span>&#125;&#123;问题&#125;<br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\mcm@cap@example</span>&#125;&#123;例&#125;<br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\mcm@cap@proof</span>&#125;&#123;证明&#125;<br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\mcm@cap@solution</span>&#125;&#123;解&#125;<br> <span class="hljs-comment">%%%  中文标题名称</span><br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\mcm@cap@contentsname</span>&#125;&#123;目录&#125;<br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\mcm@cap@listfigurename</span>&#125;&#123;插图清单&#125;<br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\mcm@cap@listtablename</span>&#125;&#123;附表清单&#125;<br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\mcm@cap@refname</span>&#125;&#123;参考文献&#125;<br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\mcm@cap@indexname</span>&#125;&#123;索引&#125;<br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\mcm@cap@figurename</span>&#125;&#123;图&#125;<br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\mcm@cap@tablename</span>&#125;&#123;表&#125;<br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\mcm@cap@appendixname</span>&#125;&#123;附录&#125;<br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\mcm@cap@abstractname</span>&#125;&#123;摘要&#125;<br> <span class="hljs-comment">%%%  中文关键字</span><br><span class="hljs-keyword">\newcommand</span>*&#123;<span class="hljs-keyword">\mcm@cap@keywordsname</span>&#125;&#123;关键词&#125;<br><br> <span class="hljs-comment">%%% 承诺书中的常量</span><br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@commit@string@headname</span>&#123;赛区评阅编号（由赛区组委会填写）：&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@commit@string@titlea</span>&#123;<span class="hljs-keyword">\the</span><span class="hljs-keyword">\year</span> 高教社杯全国大学生数学建模竞赛&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@commit@string@titleb</span>&#123;承<span class="hljs-keyword">\hspace</span>&#123;1em&#125;诺<span class="hljs-keyword">\hspace</span>&#123;1em&#125;书&#125;<br><span class="hljs-keyword">\newcommand</span><span class="hljs-keyword">\mcm@commit@string@contents</span>&#123;<span class="hljs-keyword">\quotation</span><br>我们仔细阅读了《全国大学生数学建模竞赛章程》和《全国大学生数学建模竞赛参赛规则》（以下简称 “竞赛章程和参赛规则”，可从http://www.mcm.edu.cn下载）。<br><br>我们完全清楚，在竞赛开始后参赛队员不能以任何方式，包括电话、电子邮件、“贴吧”、QQ群、微信群等，与队外的任何人（包括指导教师）交流、讨论与赛题有关的问题；无论主动参与讨论还是被动接收讨论信息都是严重违反竞赛纪律的行为。<br><br>我们完全清楚，在竞赛中必须合法合规地使用文献资料和软件工具，不能有任何侵犯知识产权的行为。否则我们将失去评奖资格，并可能受到严肃处理。<br><br>&#123;<span class="hljs-keyword">\bfseries</span><span class="hljs-keyword">\song</span> 我们以中国大学生名誉和诚信郑重承诺，严格遵守竞赛章程和参赛规则，以保证竞赛的公正、公平性。如有违反竞赛章程和参赛规则的行为，我们将受到严肃处理。&#125;<br><br>我们授权全国大学生数学建模竞赛组委会，可将我们的论文以任何形式进行公开展示（包括进行网上公示，在书籍、期刊和其他媒体进行正式或非正式发表等）。<br><span class="hljs-keyword">\endquotation</span><br>&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@commit@string@problemnum</span>&#123;我们参赛选择的题号（从A/B/C/D/E中选择一项填写）：&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@commit@string@signupnum</span>&#123;我们的报名参赛队号（12位数字全国统一编号）：&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@commit@string@schoolname</span>&#123;参赛学校（完整的学校全称，不含院系名）：&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@commit@string@membername</span>&#123;参赛队员 (打印并签名) ：&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@commit@string@supervisorname</span>&#123;指导教师或指导教师组负责人  (打印并签名)：&#125;<br><span class="hljs-keyword">\newcommand</span><span class="hljs-keyword">\mcm@commit@string@inform</span>&#123;<span class="hljs-keyword">\quotation</span><br><span class="hljs-keyword">\noindent</span>&#123;（<span class="hljs-keyword">\bfseries</span><span class="hljs-keyword">\kai</span> 请勿改动此页内容和格式。此承诺书打印签名后作为纸质论文的封面，注意电子版论文中不得出现此页。<span class="hljs-comment">%</span><br>以上内容请仔细核对，如填写错误，论文可能被取消评奖资格。）&#125;<br><span class="hljs-keyword">\endquotation</span><br>&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@commit@string@date</span>&#123;日期:&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@commit@string@year</span>&#123;年&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@commit@string@month</span>&#123;月&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@commit@string@day</span>&#123;日&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@commit@string@appraisenum</span>&#123;赛区评阅编号（由赛区组委会评阅前进行编号）：&#125;<br><br> <span class="hljs-comment">%%% 编号专用页中的常量</span><br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@numberpage@string@headname</span>&#123;赛区评阅编号：&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@numberpage@string@headnameb</span>&#123;（由赛区填写）&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@numberpage@string@allcountrynum</span>&#123;全国评阅编号：&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@numberpage@string@allcountrynumb</span>&#123;（全国组委会填写）&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@numberpage@string@titlea</span>&#123;<span class="hljs-keyword">\the</span><span class="hljs-keyword">\year</span> 高教社杯全国大学生数学建模竞赛&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@numberpage@string@titleb</span>&#123;编<span class="hljs-keyword">\hspace</span>&#123;.5em&#125;号<span class="hljs-keyword">\hspace</span>&#123;.5em&#125;专<span class="hljs-keyword">\hspace</span>&#123;.5em&#125;用<span class="hljs-keyword">\hspace</span>&#123;.5em&#125;页&#125;<br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@numberpage@string@appraiselog</span>&#123;赛区评阅记录（可供赛区评阅时使用）：&#125;<br><span class="hljs-keyword">\newcommand</span><span class="hljs-keyword">\mcm@numberpage@string@reviewer</span>&#123;<span class="hljs-keyword">\shortstack</span>&#123;评<span class="hljs-keyword">\\</span> 阅<span class="hljs-keyword">\\</span> 人&#125;&#125;<br><span class="hljs-keyword">\newcommand</span><span class="hljs-keyword">\mcm@numberpage@string@remarks</span>&#123;<span class="hljs-keyword">\shortstack</span>&#123;备<span class="hljs-keyword">\\</span> 注&#125;&#125;<br><br><br><span class="hljs-keyword">\newcommand</span>*<span class="hljs-keyword">\mcm@numberpage@string@countrynum</span>&#123;送全国评阅统一编号:<span class="hljs-keyword">\par</span> <span class="hljs-keyword">\hspace</span>*&#123;2em&#125;（赛区组委会填写）&#125;<br><span class="hljs-keyword">\newcommand</span><span class="hljs-keyword">\mcm@numberpage@string@inform</span>&#123;<span class="hljs-keyword">\quotation</span><br><span class="hljs-keyword">\noindent</span>（&#123;<span class="hljs-keyword">\bfseries</span><span class="hljs-keyword">\kai</span> 请勿改动此页内容和格式。此编号专用页仅供赛区和全国评阅使用，参赛队打印后装订到纸质论文的第二页上。<br>注意电子版论文中不得出现此页。&#125;）<br><span class="hljs-keyword">\endquotation</span><br>&#125;<br><span class="hljs-comment">%设置目录格式</span><br><span class="hljs-comment">% 节的目录格式</span><br><span class="hljs-comment">% \titlecontents&#123;section&#125;[0pt]&#123;\vspace&#123;2mm&#125;\bfseries&#125;</span><br><span class="hljs-comment">% &#123;\thecontentslabel\hskip.5em&#125;&#123;&#125;&#123;\titlerule*[0.5pc]&#123;.&#125;\contentspage&#125;</span><br><span class="hljs-comment">% % 小节的目录格式</span><br><span class="hljs-comment">% \titlecontents&#123;subsection&#125;[30pt]&#123;\songti&#125;</span><br><span class="hljs-comment">% &#123;\thecontentslabel\hskip.5em&#125;&#123;&#125;&#123;\titlerule*[0.5pc]&#123;.&#125;\contentspage&#125;</span><br><span class="hljs-comment">% \titlecontents&#123;subsubsection&#125;[55pt]&#123;\songti&#125;</span><br><span class="hljs-comment">% &#123;\thecontentslabel\hskip.5em&#125;&#123;&#125;&#123;\titlerule*[0.5pc]&#123;.&#125;\contentspage&#125;</span><br><br><span class="hljs-comment">% 上标文献</span><br><span class="hljs-keyword">\newcommand</span>&#123;<span class="hljs-keyword">\upcite</span>&#125;[1]&#123;<span class="hljs-built_in">$</span><span class="hljs-built_in">^</span>&#123;<span class="hljs-keyword">\mbox</span>&#123;<span class="hljs-keyword">\scriptsize</span> <span class="hljs-keyword">\cite</span>&#123;<span class="hljs-params">#1</span>&#125;&#125;&#125;<span class="hljs-built_in">$</span>&#125;<br><span class="hljs-keyword">\newcommand</span>&#123;<span class="hljs-keyword">\supercite</span>&#125;[1]&#123;<span class="hljs-keyword">\textsuperscript</span>&#123;<span class="hljs-keyword">\textsuperscript</span>&#123;<span class="hljs-keyword">\cite</span>&#123;<span class="hljs-params">#1</span>&#125;&#125;&#125;&#125;<br><span class="hljs-keyword">\endinput</span><br></code></pre></td></tr></table></figure>

    </div>
</div>
<p>虽然这个<code>cumcmthesis.cls</code>确实有点屎山吧，但生产力环境用起来的时候（比如三天的数模），可没有时间去修正和推倒从头来格式的编写。</p>
<p>多天尝试无果后，于是只好卸载MikTex，重新装回来了MacTex。与第一次浑浑噩噩得接触大为不同，这次算是终于初探<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext>LaTeX</mtext></mrow><annotation encoding="application/x-tex">\LaTeX</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8988em;vertical-align:-0.2155em;"></span><span class="mord text"><span class="mord textrm">L</span><span class="mspace" style="margin-right:-0.36em;"></span><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.6833em;"><span style="top:-2.905em;"><span class="pstrut" style="height:2.7em;"></span><span class="mord"><span class="mord textrm mtight sizing reset-size6 size3">A</span></span></span></span></span></span><span class="mspace" style="margin-right:-0.15em;"></span><span class="mord text"><span class="mord textrm">T</span><span class="mspace" style="margin-right:-0.1667em;"></span><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.4678em;"><span style="top:-2.7845em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord textrm">E</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2155em;"><span></span></span></span></span><span class="mspace" style="margin-right:-0.125em;"></span><span class="mord textrm">X</span></span></span></span></span></span>本地配置。也算是折腾出了为什么会有这么多用户不约而同地在配置完成<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext>LaTeX</mtext></mrow><annotation encoding="application/x-tex">\LaTeX</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8988em;vertical-align:-0.2155em;"></span><span class="mord text"><span class="mord textrm">L</span><span class="mspace" style="margin-right:-0.36em;"></span><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.6833em;"><span style="top:-2.905em;"><span class="pstrut" style="height:2.7em;"></span><span class="mord"><span class="mord textrm mtight sizing reset-size6 size3">A</span></span></span></span></span></span><span class="mspace" style="margin-right:-0.15em;"></span><span class="mord text"><span class="mord textrm">T</span><span class="mspace" style="margin-right:-0.1667em;"></span><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.4678em;"><span style="top:-2.7845em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord textrm">E</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2155em;"><span></span></span></span></span><span class="mspace" style="margin-right:-0.125em;"></span><span class="mord textrm">X</span></span></span></span></span></span>后写配置文档心得的缘由。一方面算是个记录，一方面，算是个reference。</p>
<h2 id="TeX-Live-VSCode的本地-LaTeX配置">TeX Live+VSCode的本地<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext>LaTeX</mtext></mrow><annotation encoding="application/x-tex">\LaTeX</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8988em;vertical-align:-0.2155em;"></span><span class="mord text"><span class="mord textrm">L</span><span class="mspace" style="margin-right:-0.36em;"></span><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.6833em;"><span style="top:-2.905em;"><span class="pstrut" style="height:2.7em;"></span><span class="mord"><span class="mord textrm mtight sizing reset-size6 size3">A</span></span></span></span></span></span><span class="mspace" style="margin-right:-0.15em;"></span><span class="mord text"><span class="mord textrm">T</span><span class="mspace" style="margin-right:-0.1667em;"></span><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.4678em;"><span style="top:-2.7845em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord textrm">E</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2155em;"><span></span></span></span></span><span class="mspace" style="margin-right:-0.125em;"></span><span class="mord textrm">X</span></span></span></span></span></span>配置</h2>
<ul>
<li>
<p>安装MacTex和VSCode。</p>
<p>当然可以选择其他IDE，这都是个性化的。</p>
</li>
<li>
<p>在VSCode的扩展商店中安装LaTeX Workshop插件</p>
<img src="/2024/11/30/%E5%85%B3%E4%BA%8ELaTeX/workshop.png" srcset="/img/loading.gif" lazyload class="" title="安装LaTeX Workshop插件"> 
<p><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext>LaTeX</mtext></mrow><annotation encoding="application/x-tex">\LaTeX</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8988em;vertical-align:-0.2155em;"></span><span class="mord text"><span class="mord textrm">L</span><span class="mspace" style="margin-right:-0.36em;"></span><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.6833em;"><span style="top:-2.905em;"><span class="pstrut" style="height:2.7em;"></span><span class="mord"><span class="mord textrm mtight sizing reset-size6 size3">A</span></span></span></span></span></span><span class="mspace" style="margin-right:-0.15em;"></span><span class="mord text"><span class="mord textrm">T</span><span class="mspace" style="margin-right:-0.1667em;"></span><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.4678em;"><span style="top:-2.7845em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord textrm">E</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2155em;"><span></span></span></span></span><span class="mspace" style="margin-right:-0.125em;"></span><span class="mord textrm">X</span></span></span></span></span></span>的PATH应该是会自动配置的，Win和Mac上都一样，不需要额外的操作。</p>
</li>
<li>
<p>参考了VSCode工作区的设定（当然这也可自定义）来自</p>
<ul>
<li>
<p>创建<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext>LaTeX</mtext></mrow><annotation encoding="application/x-tex">\LaTeX</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8988em;vertical-align:-0.2155em;"></span><span class="mord text"><span class="mord textrm">L</span><span class="mspace" style="margin-right:-0.36em;"></span><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.6833em;"><span style="top:-2.905em;"><span class="pstrut" style="height:2.7em;"></span><span class="mord"><span class="mord textrm mtight sizing reset-size6 size3">A</span></span></span></span></span></span><span class="mspace" style="margin-right:-0.15em;"></span><span class="mord text"><span class="mord textrm">T</span><span class="mspace" style="margin-right:-0.1667em;"></span><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.4678em;"><span style="top:-2.7845em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord textrm">E</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2155em;"><span></span></span></span></span><span class="mspace" style="margin-right:-0.125em;"></span><span class="mord textrm">X</span></span></span></span></span></span>工作区<br>
首先，我们先创建一个空文件夹。名称可以自己命名，要求最好不含中文、空格，分词可以使用下划线<code>_</code>来分词。（好习惯）</p>
<p>在VSCode中打开创建的文件夹，接着选择文件-&gt;将工作区另存为。</p>
<img src="/2024/11/30/%E5%85%B3%E4%BA%8ELaTeX/image.png" srcset="/img/loading.gif" lazyload class="" title="将工作区另存为">
<p>我们把工作区保存在该文件夹目录下即可。</p>
</li>
<li>
<p>配置工作区<br>
创建完工作区，我们就需要配置工作区，记住既然我们创建了工作区，那么所有的操作都在工作区内进行就可以了，切记不要去别的地方操作，那是没用的。</p>
<img src="/2024/11/30/%E5%85%B3%E4%BA%8ELaTeX/image-1.png" srcset="/img/loading.gif" lazyload class="" title="配置工作区">
<p>将下述代码直接贴入<code>.code-workspace</code>文件中，下面我们再来谈谈这些代码的具体作用。</p>
</li>
</ul>
</li>
</ul>
<div class='spoiler collapsed'>
    <div class='spoiler-title'>
        点击显示代码
    </div>
    <div class='spoiler-content'>
        <figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br></pre></td><td class="code"><pre><code class="hljs json"><span class="hljs-punctuation">&#123;</span><br>  <span class="hljs-attr">&quot;folders&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>    <span class="hljs-punctuation">&#123;</span><br>      <span class="hljs-attr">&quot;path&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;.&quot;</span><br>    <span class="hljs-punctuation">&#125;</span><br>  <span class="hljs-punctuation">]</span><span class="hljs-punctuation">,</span><br>  <span class="hljs-attr">&quot;settings&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">&#123;</span><br>    <span class="hljs-attr">&quot;latex-workshop.latex.tools&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>      <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;xelatex&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;command&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;xelatex&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;args&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>          <span class="hljs-string">&quot;-synctex=1&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-string">&quot;-interaction=nonstopmode&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-string">&quot;-file-line-error&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-comment">// &quot;-pdf&quot;,</span><br>          <span class="hljs-string">&quot;%DOCFILE%&quot;</span><br>        <span class="hljs-punctuation">]</span><br>      <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br>      <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;pdflatex&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;command&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;pdflatex&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;args&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>          <span class="hljs-string">&quot;-synctex=1&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-string">&quot;-interaction=nonstopmode&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-string">&quot;-file-line-error&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-string">&quot;%DOCFILE%&quot;</span><br>        <span class="hljs-punctuation">]</span><br>      <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br>      <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;makeindex&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;command&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;makeindex&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;args&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>          <span class="hljs-string">&quot;%DOCFILE%.nlo&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-string">&quot;-s&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-string">&quot;nomencl.ist&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-string">&quot;-o&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-string">&quot;%DOCFILE%.nls&quot;</span><br>        <span class="hljs-punctuation">]</span><br>      <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br>      <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;biber&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;command&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;biber&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;args&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>          <span class="hljs-string">&quot;%DOCFILE%&quot;</span><br>        <span class="hljs-punctuation">]</span><br>      <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br>      <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;bibtex&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;command&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;bibtex&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;args&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>          <span class="hljs-string">&quot;%DOCFILE%&quot;</span><br>        <span class="hljs-punctuation">]</span><br>      <span class="hljs-punctuation">&#125;</span><br>    <span class="hljs-punctuation">]</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-attr">&quot;latex-workshop.latex.recipes&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>      <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;xelatex🔃&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;tools&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>          <span class="hljs-string">&quot;xelatex&quot;</span><br>        <span class="hljs-punctuation">]</span><br>      <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br>      <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;xe-&gt;mkind-&gt;bib-&gt;xe*2🔃&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;tools&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>          <span class="hljs-string">&quot;xelatex&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-string">&quot;makeindex&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-string">&quot;biber&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-string">&quot;xelatex&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-string">&quot;xelatex&quot;</span><br>        <span class="hljs-punctuation">]</span><br>      <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br>      <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;pdf-&gt;mkind-&gt;bib-&gt;pdf*2🔃&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;tools&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>          <span class="hljs-string">&quot;pdflatex&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-string">&quot;makeindex&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-string">&quot;biber&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-string">&quot;pdflatex&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-string">&quot;pdflatex&quot;</span><br>        <span class="hljs-punctuation">]</span><br>      <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br>      <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;xe-&gt;bib-&gt;xe-&gt;xe🔃&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;tools&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>          <span class="hljs-string">&quot;xelatex&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-string">&quot;bibtex&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-string">&quot;xelatex&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-string">&quot;xelatex&quot;</span><br>        <span class="hljs-punctuation">]</span><br>      <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br>      <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;biber🔃&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;tools&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>          <span class="hljs-string">&quot;biber&quot;</span><br>        <span class="hljs-punctuation">]</span><br>      <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br>      <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;pdflatex🔃&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;tools&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>          <span class="hljs-string">&quot;pdflatex&quot;</span><br>        <span class="hljs-punctuation">]</span><br>      <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br>      <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;pdf-&gt;bib-&gt;pdf-&gt;pdf🔃&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;tools&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>          <span class="hljs-string">&quot;pdflatex&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-string">&quot;bibtex&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-string">&quot;pdflatex&quot;</span><span class="hljs-punctuation">,</span><br>          <span class="hljs-string">&quot;pdflatex&quot;</span><br>        <span class="hljs-punctuation">]</span><br>      <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br>      <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;BibTeX🔃&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;tools&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>          <span class="hljs-string">&quot;bibtex&quot;</span><br>        <span class="hljs-punctuation">]</span><br>      <span class="hljs-punctuation">&#125;</span><br>    <span class="hljs-punctuation">]</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-attr">&quot;latex-workshop.showContextMenu&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-literal"><span class="hljs-keyword">true</span></span><span class="hljs-punctuation">,</span><br>    <span class="hljs-attr">&quot;latex-workshop.view.pdf.viewer&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;tab&quot;</span><span class="hljs-punctuation">,</span> <span class="hljs-comment">//使用 VSCode 内置标签页 PDF 查看器</span><br>    <span class="hljs-attr">&quot;latex-workshop.latex.synctex.path&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;synctex&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-attr">&quot;latex-workshop.view.pdf.ref.viewer&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;tab&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-attr">&quot;latex-workshop.latex.recipe.default&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;lastUsed&quot;</span><span class="hljs-punctuation">,</span> <span class="hljs-comment">// 使用上次的编译方式</span><br>    <span class="hljs-attr">&quot;editor.wordWrap&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;on&quot;</span><span class="hljs-punctuation">,</span> <span class="hljs-comment">//VSCode 的全局编辑器设置，自动换行功能</span><br>    <span class="hljs-attr">&quot;latex-workshop.synctex.synctexjs.enabled&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-literal"><span class="hljs-keyword">false</span></span><span class="hljs-punctuation">,</span> <span class="hljs-comment">// 禁用 JavaScript SyncTeX</span><br>    <span class="hljs-attr">&quot;latex-workshop.synctex.afterBuild.enabled&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-literal"><span class="hljs-keyword">true</span></span><span class="hljs-punctuation">,</span> <span class="hljs-comment">// 构建后启用 SyncTeX</span><br>    <span class="hljs-attr">&quot;latex-snippets.autoSuggestionOn&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-literal"><span class="hljs-keyword">true</span></span><span class="hljs-punctuation">,</span> <span class="hljs-comment">//LaTeX 代码片段（snippets）的自动建议设置，在编写 LaTeX 文档时自动提供代码片段建议</span><br>  <span class="hljs-punctuation">&#125;</span><br><span class="hljs-punctuation">&#125;</span><br></code></pre></td></tr></table></figure>
    </div>
</div>
<p>在使用 <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext>LaTeX</mtext></mrow><annotation encoding="application/x-tex">\LaTeX</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8988em;vertical-align:-0.2155em;"></span><span class="mord text"><span class="mord textrm">L</span><span class="mspace" style="margin-right:-0.36em;"></span><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.6833em;"><span style="top:-2.905em;"><span class="pstrut" style="height:2.7em;"></span><span class="mord"><span class="mord textrm mtight sizing reset-size6 size3">A</span></span></span></span></span></span><span class="mspace" style="margin-right:-0.15em;"></span><span class="mord text"><span class="mord textrm">T</span><span class="mspace" style="margin-right:-0.1667em;"></span><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.4678em;"><span style="top:-2.7845em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord textrm">E</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2155em;"><span></span></span></span></span><span class="mspace" style="margin-right:-0.125em;"></span><span class="mord textrm">X</span></span></span></span></span></span> 编译文件时，<code>.synctex.gz</code>文件是 SyncTeX 同步功能生成的压缩文件。这个文件主要用于文本编辑器和 PDF 阅读器之间的正向和反向同步。上述配置已经确保在编译 <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext>LaTeX</mtext></mrow><annotation encoding="application/x-tex">\LaTeX</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8988em;vertical-align:-0.2155em;"></span><span class="mord text"><span class="mord textrm">L</span><span class="mspace" style="margin-right:-0.36em;"></span><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.6833em;"><span style="top:-2.905em;"><span class="pstrut" style="height:2.7em;"></span><span class="mord"><span class="mord textrm mtight sizing reset-size6 size3">A</span></span></span></span></span></span><span class="mspace" style="margin-right:-0.15em;"></span><span class="mord text"><span class="mord textrm">T</span><span class="mspace" style="margin-right:-0.1667em;"></span><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.4678em;"><span style="top:-2.7845em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord textrm">E</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2155em;"><span></span></span></span></span><span class="mspace" style="margin-right:-0.125em;"></span><span class="mord textrm">X</span></span></span></span></span></span> 时添加 -synctex=1 选项，这样可以实现源代码和 PDF 之间的双向跳转。</p>
<p>在需要双向跳转的情况下，务必保留这个文件。<code>构建LaTeX项目</code>下的<code>清理辅助文件</code>会保留该文件。</p>
<p>解释部分没啥重复撰写的必要，就再引用一下:</p>
<blockquote>
<p><code>latex-workshop.latex.tools</code>这里面主要配置的就是各种编译方式，我们最常用到的就两种<code>xelatex</code>和<code>bibtex</code>（注意不是biber），有时候也会用到<code>pdflatex</code>。一开始，我一直都无法编译.bib的参考文献，原因就出在编译链使用 的是biber，而非bibtex，所以我就改了。</p>
<p><code>latex-workshop.latex.recipes</code>这里面就是所谓的编译链了。我们知道LaTeX生成PDF的原理就是使用编译器进行编译。一般的文件我们只需要使用一次或两次xelatex即可编译成功；而当我们有含.bib的参考文献时，一般的编译链就变成，编译一次xelatex，一次bibtex，两次xelatex，也就是上述编译链中的&quot;xe-&gt;bib-&gt;xe-&gt;xe🔃&quot;。</p>
</blockquote>
<p>其实还有编译包括目录的文档的时候也需要两次编译，两次编译期间不要清理辅助文件。以及显然，<code>latex-workshop.latex.recipes</code>的每个<code>recipe</code>名字可以更改。</p>
<ul>
<li>
<p>单击<code>SyncTeX from cursor</code>即可正向搜索。</p>
<img src="/2024/11/30/%E5%85%B3%E4%BA%8ELaTeX/cursor.png" srcset="/img/loading.gif" lazyload class="" title="正向搜索">
</li>
<li>
<p>反向同步的内部查看器：ctrl/cmd +点击(默认)或双击</p>
<img src="/2024/11/30/%E5%85%B3%E4%BA%8ELaTeX/back.png" srcset="/img/loading.gif" lazyload class="" title="反向同步">
</li>
</ul>
<p><strong>总之，一般情况下，纯英文tex使用配方：<code>pdflatex🔃</code>；中文tex使用配方：<code>xe-&gt;bib-&gt;xe-&gt;xe🔃</code>。</strong></p>
<p>突然想起来，我看了一下我的用户<code>settings.json</code>，发现自己vscode下的’/Users/xxx/Library/Application Support/Code/User/settings.json’似乎之前配置过了😅。没事，这个当作全局，上面的当作工作区。要是不想搞全局的用户设置也无妨。（或者说反过来也无妨。看个人软件设置的偏好，喜欢全局还是单个工作区单个设定，自己别搞混就行）</p>
<div class='spoiler collapsed'>
    <div class='spoiler-title'>
        点击显示代码
    </div>
    <div class='spoiler-content'>
        <figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br></pre></td><td class="code"><pre><code class="hljs json"><span class="hljs-punctuation">&#123;</span><span class="hljs-attr">&quot;latex-workshop.latex.tools&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span>	<br>    <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;pdflatex&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;command&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;pdflatex&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;args&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>            <span class="hljs-string">&quot;-synctex=1&quot;</span><span class="hljs-punctuation">,</span><br>            <span class="hljs-string">&quot;-interaction=nonstopmode&quot;</span><span class="hljs-punctuation">,</span><br>            <span class="hljs-string">&quot;-file-line-error&quot;</span><span class="hljs-punctuation">,</span><br>            <span class="hljs-string">&quot;%DOCFILE%&quot;</span><br>        <span class="hljs-punctuation">]</span><br>    <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;xelatex&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;command&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;xelatex&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;args&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>            <span class="hljs-string">&quot;-synctex=1&quot;</span><span class="hljs-punctuation">,</span><br>            <span class="hljs-string">&quot;-interaction=nonstopmode&quot;</span><span class="hljs-punctuation">,</span><br>            <span class="hljs-string">&quot;-file-line-error&quot;</span><span class="hljs-punctuation">,</span><br>            <span class="hljs-string">&quot;%DOCFILE%&quot;</span><br>        <span class="hljs-punctuation">]</span><br>    <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;bibtex&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;command&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;bibtex&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;args&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>            <span class="hljs-string">&quot;%DOCFILE%&quot;</span><br>        <span class="hljs-punctuation">]</span><br>    <span class="hljs-punctuation">&#125;</span><br><span class="hljs-punctuation">]</span><span class="hljs-punctuation">,</span><br><span class="hljs-attr">&quot;latex-workshop.latex.recipes&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>    <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;xelatex&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;tools&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>            <span class="hljs-string">&quot;xelatex&quot;</span><br>        <span class="hljs-punctuation">]</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;pdflatex&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;tools&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>            <span class="hljs-string">&quot;pdflatex&quot;</span><br>        <span class="hljs-punctuation">]</span><br>    <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;xe-&gt;bib-&gt;xe-&gt;xe&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;tools&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>            <span class="hljs-string">&quot;xelatex&quot;</span><span class="hljs-punctuation">,</span><br>            <span class="hljs-string">&quot;bibtex&quot;</span><span class="hljs-punctuation">,</span><br>            <span class="hljs-string">&quot;xelatex&quot;</span><span class="hljs-punctuation">,</span><br>            <span class="hljs-string">&quot;xelatex&quot;</span><br>        <span class="hljs-punctuation">]</span><br>    <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;pdf-&gt;bib-&gt;pdf-&gt;pdf&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;tools&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>            <span class="hljs-string">&quot;pdflatex&quot;</span><span class="hljs-punctuation">,</span><br>            <span class="hljs-string">&quot;bibtex&quot;</span><span class="hljs-punctuation">,</span><br>            <span class="hljs-string">&quot;pdflatex&quot;</span><span class="hljs-punctuation">,</span><br>            <span class="hljs-string">&quot;pdflatex&quot;</span><br>        <span class="hljs-punctuation">]</span><br>    <span class="hljs-punctuation">&#125;</span><br><span class="hljs-punctuation">]</span><span class="hljs-punctuation">,</span><br><span class="hljs-attr">&quot;latex-workshop.latex.clean.fileTypes&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>    <span class="hljs-string">&quot;*.aux&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-string">&quot;*.bbl&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-string">&quot;*.blg&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-string">&quot;*.idx&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-string">&quot;*.ind&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-string">&quot;*.lof&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-string">&quot;*.lot&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-string">&quot;*.out&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-string">&quot;*.toc&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-string">&quot;*.acn&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-string">&quot;*.acr&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-string">&quot;*.alg&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-string">&quot;*.glg&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-string">&quot;*.glo&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-string">&quot;*.gls&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-string">&quot;*.ist&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-string">&quot;*.fls&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-string">&quot;*.log&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-string">&quot;*.fdb_latexmk&quot;</span><br><span class="hljs-punctuation">]</span><span class="hljs-punctuation">,</span><br><span class="hljs-comment">//tex文件浏览器，可选项为&quot;none&quot; &quot;browser&quot; &quot;tab&quot; &quot;external&quot;</span><br><span class="hljs-attr">&quot;latex-workshop.view.pdf.viewer&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;tab&quot;</span><span class="hljs-punctuation">,</span><br><span class="hljs-comment">//自动编译tex文件</span><br><span class="hljs-attr">&quot;latex-workshop.latex.autoBuild.run&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;onFileChange&quot;</span><span class="hljs-punctuation">,</span><br><span class="hljs-comment">//显示内容菜单：（1）编译文件；（2）定位游标</span><br><span class="hljs-attr">&quot;latex-workshop.showContextMenu&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-literal"><span class="hljs-keyword">true</span></span><span class="hljs-punctuation">,</span><br><span class="hljs-comment">//显示错误</span><br><span class="hljs-attr">&quot;latex-workshop.message.error.show&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-literal"><span class="hljs-keyword">false</span></span><span class="hljs-punctuation">,</span><br><span class="hljs-comment">//显示警告</span><br><span class="hljs-attr">&quot;latex-workshop.message.warning.show&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-literal"><span class="hljs-keyword">false</span></span><span class="hljs-punctuation">,</span><br><span class="hljs-comment">//从使用的包中自动补全命令和环境</span><br><span class="hljs-attr">&quot;latex-workshop.intellisense.package.enabled&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-literal"><span class="hljs-keyword">true</span></span><span class="hljs-punctuation">,</span><br><span class="hljs-comment">//设置为never，为不清除辅助文件</span><br><span class="hljs-attr">&quot;latex-workshop.latex.autoClean.run&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;never&quot;</span><span class="hljs-punctuation">,</span><br><span class="hljs-comment">//设置vscode编译tex文档时的默认编译链</span><br><span class="hljs-attr">&quot;latex-workshop.latex.recipe.default&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;lastUsed&quot;</span><span class="hljs-punctuation">,</span><br><span class="hljs-comment">// 用于反向同步的内部查看器的键绑定。ctrl/cmd +点击(默认)或双击</span><br><span class="hljs-attr">&quot;latex-workshop.view.pdf.internal.synctex.keybinding&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;double-click&quot;</span><span class="hljs-punctuation">,</span><br><span class="hljs-attr">&quot;dart.flutterSdkPath&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;/Users/victor/development/flutter&quot;</span><span class="hljs-punctuation">,</span><br><span class="hljs-attr">&quot;editor.unicodeHighlight.ambiguousCharacters&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-literal"><span class="hljs-keyword">false</span></span><span class="hljs-punctuation">,</span><br><br><span class="hljs-punctuation">&#125;</span><br></code></pre></td></tr></table></figure>
    </div>
</div>
<p>我又看了看，这个原先的全局配置是有些考虑不周的，比如没有双向同步等。这个全局配置还是别看了，直接用工作区的配置文件把这个全局的覆盖掉吧。直接覆盖记得删去</p>
<figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><code class="hljs json"><span class="hljs-punctuation">&#123;</span><br>      <span class="hljs-attr">&quot;folders&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><br>        <span class="hljs-punctuation">&#123;</span><br>          <span class="hljs-attr">&quot;path&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;.&quot;</span><br>        <span class="hljs-punctuation">&#125;</span><br>      <span class="hljs-punctuation">]</span><span class="hljs-punctuation">,</span><br>      <span class="hljs-attr">&quot;settings&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">&#123;</span><br>        pass<br>        <br><span class="hljs-punctuation">&#125;</span><br></code></pre></td></tr></table></figure>
<h2 id="其他事项">其他事项</h2>
<p>主要配置就完成了，一些注意事项：</p>
<ul>
<li>
<p>LaTeX Workshop 默认的编译工具是 latexmk，一般不需要用到。</p>
</li>
<li>
<p><code>tools</code> 中使用 <code>%DOC%</code> 而非 <code>%DOCFILE%</code> 是考虑到支持编译中文路径下的文件。</p>
</li>
<li>
<p>第一个 <code>recipe</code> 为默认的编译工具</p>
</li>
</ul>
<p>引文还提到了以下这些，不过我没有应用：</p>
<blockquote>
<ul>
<li>快捷键设置<br>
在 VSCode 界面下按下 F1，键入“keyjson”，选择“打开键盘快捷方式(JSON)”，然后把以下代码放入：</li>
</ul>
<figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><code class="hljs json"><span class="hljs-punctuation">&#123;</span><br>     <span class="hljs-attr">&quot;key&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;alt+s&quot;</span><span class="hljs-punctuation">,</span><br>     <span class="hljs-attr">&quot;command&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;latex-workshop.synctex&quot;</span><span class="hljs-punctuation">,</span><br>     <span class="hljs-attr">&quot;when&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;editorTextFocus &amp;&amp; !isMac&quot;</span><br> <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br> <span class="hljs-punctuation">&#123;</span><br>     <span class="hljs-attr">&quot;key&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;alt+b&quot;</span><span class="hljs-punctuation">,</span><br>     <span class="hljs-attr">&quot;command&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;latex-workshop.build&quot;</span><span class="hljs-punctuation">,</span><br>     <span class="hljs-attr">&quot;when&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;editorTextFocus &amp;&amp; !isMac&quot;</span><br> <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br> <span class="hljs-punctuation">&#123;</span><br>     <span class="hljs-attr">&quot;key&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;alt+t&quot;</span><span class="hljs-punctuation">,</span><br>     <span class="hljs-attr">&quot;command&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;latex-workshop.kill&quot;</span><span class="hljs-punctuation">,</span><br>     <span class="hljs-attr">&quot;when&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;editorTextFocus &amp;&amp; !isMac&quot;</span><br> <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br> <span class="hljs-punctuation">&#123;</span><br>     <span class="hljs-attr">&quot;key&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;alt+e&quot;</span><span class="hljs-punctuation">,</span><br>     <span class="hljs-attr">&quot;command&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;latex-workshop.recipes&quot;</span><br> <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br></code></pre></td></tr></table></figure>
<p>这段代码的意义是将 Alt+s 绑定到正向搜索，将 Alt+b 绑定到使用默认 recipe 编译，将 Alt+t 绑定到终止编译，将 Alt+e 绑定到选择其他 recipe 编译，可以自行更换为适合自己的快捷键，只需修改“key”那一项即可。</p>
<ul>
<li>其他设置<br>
LaTeX Workshop 默认保存的时候自动编译，如果不喜欢这个设置，可以添加以下代码进入设置区：</li>
</ul>
 <figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs json"><span class="hljs-attr">&quot;latex-workshop.latex.autoBuild.run&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;never&quot;</span><span class="hljs-punctuation">,</span><br></code></pre></td></tr></table></figure>
<p>如果编译出错，插件会弹出两个很烦人的气泡，不喜欢的话可以在设置中添加以下代码：</p>
 <figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs json"><span class="hljs-attr">&quot;latex-workshop.message.error.show&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-literal"><span class="hljs-keyword">false</span></span><span class="hljs-punctuation">,</span><br><span class="hljs-attr">&quot;latex-workshop.message.warning.show&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-literal"><span class="hljs-keyword">false</span></span><span class="hljs-punctuation">,</span><br></code></pre></td></tr></table></figure>
</blockquote>
<h2 id="又及：">又及：</h2>
<h3 id="part1：ctex-xeCJK">part1：ctex &amp; xeCJK</h3>
<p>ctex 和 xeCJK 的主要区别如下：</p>
<ol>
<li>功能范围：</li>
</ol>
<ul>
<li>xeCJK 是一个基础的中文支持包，主要处理中文字体和标点符号的显示</li>
<li>ctex 是一个更全面的中文排版工具集，它在 xeCJK 的基础上提供了更多功能</li>
</ul>
<ol start="2">
<li>开箱即用程度：</li>
</ol>
<ul>
<li>xeCJK 需要手动配置字体和其他排版参数</li>
<li>ctex 提供了预设的中文排版格式，包括字体配置、版式设置等</li>
</ul>
<ol start="3">
<li>具体功能对比：</li>
</ol>
<p>xeCJK：</p>
<figure class="highlight latex"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs latex"><span class="hljs-keyword">\usepackage</span>&#123;xeCJK&#125;<br><span class="hljs-keyword">\setCJKmainfont</span>&#123;Songti SC&#125;  <span class="hljs-comment">% 必须手动设置字体</span><br></code></pre></td></tr></table></figure>
<ul>
<li>基础的中文支持</li>
<li>字体设置</li>
<li>标点符号处理</li>
<li>中英文间距调整</li>
</ul>
<p>ctex：</p>
<figure class="highlight latex"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs latex"><span class="hljs-keyword">\usepackage</span>[UTF8]&#123;ctex&#125;  <span class="hljs-comment">% 自动配置大部分设置</span><br></code></pre></td></tr></table></figure>
<ul>
<li>包含 xeCJK 的所有功能</li>
<li>自动配置中文字体</li>
<li>章节标题的中文格式</li>
<li>中文版式设置（如标点悬挂）</li>
<li>中文数字转换</li>
<li>提供文档类（ctexart、ctexbook 等）</li>
</ul>
<ol start="4">
<li>使用场景：</li>
</ol>
<ul>
<li>如果只需要在英文文档中插入少量中文：用 xeCJK 够用</li>
<li>如果要编写完整的中文文档：建议用 ctex</li>
</ul>
<ol start="5">
<li>举例说明：<br>
使用 xeCJK：</li>
</ol>
<figure class="highlight latex"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><code class="hljs latex"><span class="hljs-keyword">\documentclass</span>&#123;article&#125;<br><span class="hljs-keyword">\usepackage</span>&#123;xeCJK&#125;<br><span class="hljs-keyword">\setCJKmainfont</span>&#123;Songti SC&#125;<br><span class="hljs-keyword">\begin</span>&#123;document&#125;<br>第一章 介绍<br>这是一个测试文档。<br><span class="hljs-keyword">\end</span>&#123;document&#125;<br></code></pre></td></tr></table></figure>
<p>使用 ctex：</p>
<figure class="highlight latex"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><code class="hljs latex"><span class="hljs-keyword">\documentclass</span>&#123;ctexart&#125;  <span class="hljs-comment">% 或者用 \usepackage&#123;ctex&#125;</span><br><span class="hljs-keyword">\begin</span>&#123;document&#125;<br>第一章 介绍<br>这是一个测试文档。<br><span class="hljs-keyword">\end</span>&#123;document&#125;<br></code></pre></td></tr></table></figure>
<p>一般建议：</p>
<ul>
<li>对于正式的中文文档，优先使用 ctex，它能处理好大多数中文排版细节</li>
<li>如果遇到特殊需求或者想要更精细的控制，可以使用 xeCJK</li>
<li>在一些简单的场景下，如果 ctex 配置有问题，也可以退而求其次使用 xeCJK</li>
</ul>
<h3 id="part2：ctexart-article">part2：ctexart &amp; article</h3>
<p><code>\documentclass[UTF8]&#123;ctexart&#125;</code> 和 <code>\documentclass&#123;article&#125;</code> 有以下主要区别：</p>
<ol>
<li>字体和中文支持：</li>
</ol>
<ul>
<li><code>ctexart</code>：自动配置中文支持，包含中文字体设置和标点符号处理</li>
<li><code>article</code>：默认只支持英文，需要手动添加中文支持包（如 xeCJK 或 ctex）</li>
</ul>
<ol start="2">
<li>章节标题格式：</li>
</ol>
<ul>
<li><code>ctexart</code>：使用中文格式的章节标题（如&quot;第一章&quot;）</li>
<li><code>article</code>：使用英文格式的章节标题（如&quot;Chapter 1&quot;）</li>
</ul>
<ol start="3">
<li>页面布局：</li>
</ol>
<ul>
<li><code>ctexart</code>：采用适合中文排版的页面设置（如行距、段落间距等）</li>
<li><code>article</code>：使用西文排版的标准设置</li>
</ul>
<ol start="4">
<li>文档结构：</li>
</ol>
<ul>
<li><code>ctexart</code>：比如 <code>\maketitle</code> 会生成中文格式的标题页</li>
<li><code>article</code>：生成英文格式的标题页</li>
</ul>
<p>例子：</p>
<p>使用 article：</p>
<figure class="highlight latex"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><code class="hljs latex"><span class="hljs-keyword">\documentclass</span>&#123;article&#125;<br><span class="hljs-keyword">\usepackage</span>&#123;xeCJK&#125;  <span class="hljs-comment">% 需要手动添加中文支持</span><br><span class="hljs-keyword">\setCJKmainfont</span>&#123;Songti SC&#125;<br><br><span class="hljs-keyword">\title</span>&#123;测试文档&#125;<br><span class="hljs-keyword">\author</span>&#123;张三&#125;<br><span class="hljs-keyword">\date</span>&#123;<span class="hljs-keyword">\today</span>&#125;<br><br><span class="hljs-keyword">\begin</span>&#123;document&#125;<br><span class="hljs-keyword">\maketitle</span><br><span class="hljs-keyword">\section</span>&#123;引言&#125;<br>这是一个测试。<br><span class="hljs-keyword">\end</span>&#123;document&#125;<br></code></pre></td></tr></table></figure>
<p>使用 ctexart：</p>
<figure class="highlight latex"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><code class="hljs latex"><span class="hljs-keyword">\documentclass</span>[UTF8]&#123;ctexart&#125;<br><br><span class="hljs-keyword">\title</span>&#123;测试文档&#125;<br><span class="hljs-keyword">\author</span>&#123;张三&#125;<br><span class="hljs-keyword">\date</span>&#123;<span class="hljs-keyword">\today</span>&#125;<br><br><span class="hljs-keyword">\begin</span>&#123;document&#125;<br><span class="hljs-keyword">\maketitle</span><br><span class="hljs-keyword">\section</span>&#123;引言&#125;<br>这是一个测试。<br><span class="hljs-keyword">\end</span>&#123;document&#125;<br></code></pre></td></tr></table></figure>
<p>所以，对于中文文档：</p>
<ul>
<li>如果是以中文为主的文档，建议使用 <code>ctexart</code></li>
<li>如果是以英文为主、偶尔包含中文的文档，可以使用 <code>article</code></li>
</ul>
<p>后续会继续完善自己的<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext>LaTeX</mtext></mrow><annotation encoding="application/x-tex">\LaTeX</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8988em;vertical-align:-0.2155em;"></span><span class="mord text"><span class="mord textrm">L</span><span class="mspace" style="margin-right:-0.36em;"></span><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.6833em;"><span style="top:-2.905em;"><span class="pstrut" style="height:2.7em;"></span><span class="mord"><span class="mord textrm mtight sizing reset-size6 size3">A</span></span></span></span></span></span><span class="mspace" style="margin-right:-0.15em;"></span><span class="mord text"><span class="mord textrm">T</span><span class="mspace" style="margin-right:-0.1667em;"></span><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.4678em;"><span style="top:-2.7845em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord textrm">E</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2155em;"><span></span></span></span></span><span class="mspace" style="margin-right:-0.125em;"></span><span class="mord textrm">X</span></span></span></span></span></span>知识库。</p>
<p>又及：也是事情多了，记性差了。一翻找文件夹才发现暑假之前6月就整理过好多<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext>LaTeX</mtext></mrow><annotation encoding="application/x-tex">\LaTeX</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8988em;vertical-align:-0.2155em;"></span><span class="mord text"><span class="mord textrm">L</span><span class="mspace" style="margin-right:-0.36em;"></span><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.6833em;"><span style="top:-2.905em;"><span class="pstrut" style="height:2.7em;"></span><span class="mord"><span class="mord textrm mtight sizing reset-size6 size3">A</span></span></span></span></span></span><span class="mspace" style="margin-right:-0.15em;"></span><span class="mord text"><span class="mord textrm">T</span><span class="mspace" style="margin-right:-0.1667em;"></span><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.4678em;"><span style="top:-2.7845em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord textrm">E</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2155em;"><span></span></span></span></span><span class="mspace" style="margin-right:-0.125em;"></span><span class="mord textrm">X</span></span></span></span></span></span>的配置和要点了，后来只顾着写文本就淡却了，不过一翻，还是记起来了～😌</p>
<p>本文更像是心理历程，初学者直接照此配置可能不太清晰，可以多读读参考链接，就有大概思路了熟悉了。</p>
<h2 id="参考文献：">参考文献：</h2>
<p>Levitate_.如何优雅的书写LaTeX论文.<a target="_blank" rel="noopener" href="https://levitate-qian.github.io/2020/07/21/latex-vscode/">https://levitate-qian.github.io/2020/07/21/latex-vscode</a></p>
<p>Marvey.使用VSCode编写LaTeX[EB/OL].<a target="_blank" rel="noopener" href="https://zhuanlan.zhihu.com/p/38178015">https://zhuanlan.zhihu.com/p/38178015</a></p>
<p>Liam Huang.TeX Live 下载及安装说明.<a target="_blank" rel="noopener" href="https://liam.page/texlive/">https://liam.page/texlive/</a></p>
<p>董晟渤.Visual Studio Code配置LaTeX教程.<a target="_blank" rel="noopener" href="https://dylandong.top/posts/54e5/">https://dylandong.top/posts/54e5/</a></p>
<p>CTEX开发小组.一份（不太）简短的<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext>LaTeX</mtext><mn>2</mn><mi>e</mi></mrow><annotation encoding="application/x-tex">\LaTeX2e</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8988em;vertical-align:-0.2155em;"></span><span class="mord text"><span class="mord textrm">L</span><span class="mspace" style="margin-right:-0.36em;"></span><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.6833em;"><span style="top:-2.905em;"><span class="pstrut" style="height:2.7em;"></span><span class="mord"><span class="mord textrm mtight sizing reset-size6 size3">A</span></span></span></span></span></span><span class="mspace" style="margin-right:-0.15em;"></span><span class="mord text"><span class="mord textrm">T</span><span class="mspace" style="margin-right:-0.1667em;"></span><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.4678em;"><span style="top:-2.7845em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord textrm">E</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2155em;"><span></span></span></span></span><span class="mspace" style="margin-right:-0.125em;"></span><span class="mord textrm">X</span></span></span><span class="mord">2</span><span class="mord mathnormal">e</span></span></span></span>介绍.<a target="_blank" rel="noopener" href="https://github.com/CTeX-org">https://github.com/CTeX-org</a></p>
<p>韬秧道.MacTeX 配合 Visual Studio Code 进行 LaTeX 写作.<a target="_blank" rel="noopener" href="https://blog.tauyoung.top/about/">https://blog.tauyoung.top/about/</a></p>
<link rel="stylesheet" href="/css/spoiler.css" type="text/css"><script src="/js/spoiler.js" type="text/javascript" async></script>
                
              </div>
            
            <hr/>
            <div>
              <div class="post-metas my-3">
  
  
</div>


              
  

  <div class="license-box my-3">
    <div class="license-title">
      <div>TeX Live+VSCode的本地LaTeX配置</div>
      <div>https://zhoucourier.github.io/2024/11/30/关于LaTeX/</div>
    </div>
    <div class="license-meta">
      
        <div class="license-meta-item">
          <div>作者</div>
          <div>Victor</div>
        </div>
      
      
        <div class="license-meta-item license-meta-date">
          <div>发布于</div>
          <div>2024年11月30日</div>
        </div>
      
      
      
        <div class="license-meta-item">
          <div>许可协议</div>
          <div>
            
              
              
                <a class="print-no-link" target="_blank" href="https://creativecommons.org/licenses/by/4.0/">
                  <span class="hint--top hint--rounded" aria-label="BY - 署名">
                    <i class="iconfont icon-cc-by"></i>
                  </span>
                </a>
              
            
          </div>
        </div>
      
    </div>
    <div class="license-icon iconfont"></div>
  </div>



              
                <div class="post-prevnext my-3">
                  <article class="post-prev col-6">
                    
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/2024/09/26/encoding/" title="encoding">
                        <span class="hidden-mobile">encoding</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
  
  
    <article id="comments" lazyload>
      

    </article>
  


          </article>
        </div>
      </div>
    </div>

    <div class="side-col d-none d-lg-block col-lg-2">
      

    </div>
  </div>
</div>





  



  



  



  



  


  
  




  <script>
  Fluid.utils.createScript('https://lib.baomitu.com/mermaid/8.14.0/mermaid.min.js', function() {
    mermaid.initialize({"theme":"default"});

    Fluid.utils.listenDOMLoaded(function() {
      Fluid.events.registerRefreshCallback(function() {
        if ('mermaid' in window) {
          mermaid.init();
        }
      });
    });
  });
</script>






    

    
      <a id="scroll-top-button" aria-label="TOP" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v" for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>

    

    
  </main>

  <footer>
    <div class="footer-inner">
  
    <div class="footer-content">
       <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>Fluid</span></a> 
    </div>
  
  
    <div class="statistics">
  
  

  
    
      <span id="leancloud-site-pv-container" style="display: none">
        总访问量 
        <span id="leancloud-site-pv"></span>
         次
      </span>
    
    
      <span id="leancloud-site-uv-container" style="display: none">
        总访客数 
        <span id="leancloud-site-uv"></span>
         人
      </span>
    
    

  

</div>

  
  
</div>

  </footer>

  <!-- Scripts -->
  
  <script  src="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://lib.baomitu.com/jquery/3.6.4/jquery.min.js" ></script>
<script  src="https://lib.baomitu.com/twitter-bootstrap/4.6.1/js/bootstrap.min.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>


  <script  src="https://lib.baomitu.com/typed.js/2.0.12/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var subtitle = document.getElementById('subtitle');
      if (!subtitle || !typing) {
        return;
      }
      var text = subtitle.getAttribute('data-typed-text');
      
        typing(text);
      
    })(window, document);
  </script>




  
    <script  src="/js/img-lazyload.js" ></script>
  




  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/tocbot/4.20.1/tocbot.min.js', function() {
    var toc = jQuery('#toc');
    if (toc.length === 0 || !window.tocbot) { return; }
    var boardCtn = jQuery('#board-ctn');
    var boardTop = boardCtn.offset().top;

    window.tocbot.init(Object.assign({
      tocSelector     : '#toc-body',
      contentSelector : '.markdown-body',
      linkClass       : 'tocbot-link',
      activeLinkClass : 'tocbot-active-link',
      listClass       : 'tocbot-list',
      isCollapsedClass: 'tocbot-is-collapsed',
      collapsibleClass: 'tocbot-is-collapsible',
      scrollSmooth    : true,
      includeTitleTags: true,
      headingsOffset  : -boardTop,
    }, CONFIG.toc));
    if (toc.find('.toc-list-item').length > 0) {
      toc.css('visibility', 'visible');
    }

    Fluid.events.registerRefreshCallback(function() {
      if ('tocbot' in window) {
        tocbot.refresh();
        var toc = jQuery('#toc');
        if (toc.length === 0 || !tocbot) {
          return;
        }
        if (toc.find('.toc-list-item').length > 0) {
          toc.css('visibility', 'visible');
        }
      }
    });
  });
</script>


  <script src=https://lib.baomitu.com/clipboard.js/2.0.11/clipboard.min.js></script>

  <script>Fluid.plugins.codeWidget();</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/anchor-js/5.0.0/anchor.min.js', function() {
    window.anchors.options = {
      placement: CONFIG.anchorjs.placement,
      visible  : CONFIG.anchorjs.visible
    };
    if (CONFIG.anchorjs.icon) {
      window.anchors.options.icon = CONFIG.anchorjs.icon;
    }
    var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
    var res = [];
    for (var item of el) {
      res.push('.markdown-body > ' + item.trim());
    }
    if (CONFIG.anchorjs.placement === 'left') {
      window.anchors.options.class = 'anchorjs-link-left';
    }
    window.anchors.add(res.join(', '));

    Fluid.events.registerRefreshCallback(function() {
      if ('anchors' in window) {
        anchors.removeAll();
        var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
        var res = [];
        for (var item of el) {
          res.push('.markdown-body > ' + item.trim());
        }
        if (CONFIG.anchorjs.placement === 'left') {
          anchors.options.class = 'anchorjs-link-left';
        }
        anchors.add(res.join(', '));
      }
    });
  });
</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.js', function() {
    Fluid.plugins.fancyBox();
  });
</script>


  <script>Fluid.plugins.imageCaption();</script>

  <script defer src="/js/leancloud.js" ></script>

  <script  src="/js/local-search.js" ></script>





<!-- 主题的启动项，将它保持在最底部 -->
<!-- the boot of the theme, keep it at the bottom -->
<script  src="/js/boot.js" ></script>


  

  <noscript>
    <div class="noscript-warning">博客在允许 JavaScript 运行的环境下浏览效果更佳</div>
  </noscript>
</body>
</html>
